Gabirel / Hack-SpaceVim

🚀 Tell you how to hack SpaceVim. Be useful. Try Discussions!
MIT License
475 stars 68 forks source link

Disable conceal/rendering in latex #44

Open Gabirel opened 4 years ago

Gabirel commented 4 years ago

Disable conceal in latex

You may see some rendering issues in your latex files or you just want to use the original plain "text", add the code below into your init.vim

" See: http://vimdoc.sourceforge.net/htmldoc/syntax.html#g:tex_conceal
" Disable all conceal
let g:tex_conceal = ""
" Only disable math and superscripts/subscripts
let g:tex_conceal = "adg"

Explanation:

a = accents/ligatures
d = delimiters
m = math symbols
g = Greek
s = superscripts/subscripts

Reference

davibarreira commented 3 years ago

I've added this to my init.vim, and I still get the conceal :/ Any idea what might be causing this?

Gabirel commented 3 years ago

I've added this to my init.vim, and I still get the conceal :/ Any idea what might be causing this?

Sorry for the late response.

davibarreira commented 3 years ago

Hey, thanks for answering. I'm on Ubuntu 20.04. I do have init.toml on .SpaceVim.d.

Here is the init.toml

#=============================================================================
# dark_powered.toml --- dark powered configuration example for SpaceVim
# Copyright (c) 2016-2020 Wang Shidong & Contributors
# Author: Wang Shidong < wsdjeg at 163.com >
# URL: https://spacevim.org
# License: GPLv3
#=============================================================================

# All SpaceVim option below [option] section
[options]
    # set spacevim theme. by default colorscheme layer is not loaded,
    # if you want to use more colorscheme, please load the colorscheme
    # layer
    colorscheme = "SpaceVim"
    colorscheme_bg = "dark"
    # Disable guicolors in basic mode, many terminal do not support 24bit
    # true colors
    enable_guicolors = true
    # Disable statusline separator, if you want to use other value, please
    # install nerd fonts
    statusline_separator = "arrow"
    statusline_inactive_separator = "arrow"
    buffer_index_type = 4
    enable_tabline_filetype_icon = true
    enable_statusline_mode = false
    default_indent = 4
    # autocomplete_method = "ycm"

# Enable autocomplete layer
[[layers]]
name = 'autocomplete'
enable = true
auto_completion_return_key_behavior = "complete"
auto_completion_tab_key_behavior = "smart"

[[layers]]
name = 'shell'
default_position = 'top'
default_height = 30

[[layers]]
  name = "colorscheme"
[[layers]]
  name = "lang#julia"
[[layers]]
  name = "lang#python"
[[layers]]
  name = "lang#html"
[[layers]]
  name = "lang#markdown"
[[layers]]
  name = "lang#latex"

Here is my init.vim

execute 'source' fnamemodify(expand('<sfile>'), ':h').'/config/main.vim'

Finally, I use NeoVim 0.4.3.

Gabirel commented 3 years ago

I do have init.toml on .SpaceVim.d.

@davibarreira Remove init.toml to make sure SpaceVim doesn't override init.vim.

PS: init.vim is supposed to have higher priorities in SpaceVim. Unfortunately, it doesn't.

If you want to continue to use init.toml, try to use bootstrap-functions. I highly recommend to use init.vim though. Choose as you wish.

davibarreira commented 3 years ago

If I remove my init.toml how do I enable layers and stuff? I guess I'll look into the bootstrap-functions. I don't know how to use SpaceVim without init.toml

Gabirel commented 3 years ago

If I remove my init.toml how do I enable layers and stuff? I removed the init.toml, and SpaceVim got all buggy. I added back again, and for some reason I'm still getting all the errors O.o

Error detected while processing FileType Autocommands for "*":
E117: Unknown function: LaTeXtoUnicode#Refresh
Error detected while processing BufEnter Autocommands for "*":
E117: Unknown function: LaTeXtoUnicode#Refresh

I'll look into the bootstrap-functions. Thanks.

Simple and quick solution: use init.vim only.

Gabirel commented 3 years ago

@davibarreira Maybe you want to look at this template: https://github.com/Gabirel/Hack-SpaceVim/issues/10#issuecomment-416581849

davibarreira commented 3 years ago

The error was just because I wasn't refreshing the terminal -.- Thank you for the answer, @Gabirel . I'll take a look at your template.