Nvim: many small changes around whole project
This commit is contained in:
@@ -10,13 +10,17 @@ return {
|
||||
config = function()
|
||||
-- Tree-sitter configuration
|
||||
|
||||
ts = require'nvim-treesitter.configs'
|
||||
local ts = require'nvim-treesitter.configs'
|
||||
|
||||
ts.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
return vim.api.nvim_buf_line_count(buf) > 5000
|
||||
local max_filesize = 100 * 1024
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
@@ -60,10 +64,9 @@ return {
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
-- disabled, since it mostly shifts to four characters
|
||||
--indent = {
|
||||
-- enable = true,
|
||||
--},
|
||||
indent = {
|
||||
enable = true,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
@@ -79,7 +82,7 @@ return {
|
||||
include_match_words
|
||||
},
|
||||
}
|
||||
-- vim.opt.foldmethod = "expr"
|
||||
-- vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user