mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update config related to folding
1. For python and lua, rely on LSP for folding 2. show fold signs on the right of the number column
This commit is contained in:
parent
fe95658319
commit
5502d29f40
@ -3,7 +3,3 @@ set formatoptions-=o
|
||||
set formatoptions-=r
|
||||
|
||||
nnoremap <buffer><silent> <F9> :luafile %<CR>
|
||||
|
||||
" Use nvim-treesitter for folding
|
||||
set foldmethod=expr
|
||||
set foldexpr=nvim_treesitter#foldexpr()
|
||||
|
||||
@ -12,7 +12,3 @@ set tabstop=4 " number of visual spaces per TAB
|
||||
set softtabstop=4 " number of spaces in tab when editing
|
||||
set shiftwidth=4 " number of spaces to use for autoindent
|
||||
set expandtab " expand tab to spaces so that tabs are spaces
|
||||
|
||||
" Use nvim-treesitter for folding
|
||||
set foldmethod=expr
|
||||
set foldexpr=nvim_treesitter#foldexpr()
|
||||
|
||||
@ -194,9 +194,9 @@ local plugin_specs = {
|
||||
require("statuscol").setup {
|
||||
relculright = true,
|
||||
segments = {
|
||||
{ text = { builtin.foldfunc }, click = "v:lua.ScFa" },
|
||||
{ text = { "%s" }, click = "v:lua.ScSa" },
|
||||
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
|
||||
{ text = { builtin.foldfunc, " " }, condition = {true, builtin.not_empty}, click = "v:lua.ScFa" },
|
||||
},
|
||||
}
|
||||
end,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user