Nvim: update treesitter and use themify
This commit is contained in:
@@ -7,23 +7,15 @@ return {
|
||||
--"nvim-treesitter/playground",
|
||||
},
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
opts = function()
|
||||
-- Tree-sitter configuration
|
||||
|
||||
local ts = require'nvim-treesitter.configs'
|
||||
|
||||
ts.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
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,
|
||||
},
|
||||
ignore_install = {'javascript'},
|
||||
sync_install = true,
|
||||
auto_install = true,
|
||||
ensure_installed = {
|
||||
"arduino",
|
||||
"awk",
|
||||
@@ -64,8 +56,20 @@ return {
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
modules = {},
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
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,
|
||||
},
|
||||
indent = {
|
||||
enable = false,
|
||||
enable = false,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
@@ -79,11 +83,11 @@ return {
|
||||
matchup = {
|
||||
enable = true,
|
||||
-- disable = { "c", "ruby" },
|
||||
include_match_words
|
||||
},
|
||||
}
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldmethod = "manual"
|
||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
vim.opt.foldlevelstart = 99
|
||||
vim.opt.foldminlines = 50
|
||||
end
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user