Nvim is now running Lazy as its plugin Manager.
New keymaps Nvim.leap instead of flash
This commit is contained in:
@@ -1,36 +1,50 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = { "c", "lua", "python", "javascript", "markdown", "markdown_inline", "html", "css" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "c", "lua", "python", "javascript", "markdown", "markdown_inline", "html", "css", "bash", "vim", "vimdoc" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
ignore_install = {},
|
||||
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = function(lang, buf)
|
||||
local filename = vim.api.nvim_buf_get_name(buf)
|
||||
if lang == "latex" or filename:match("%.bib$") then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
},
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
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
|
||||
local filename = vim.api.nvim_buf_get_name(buf)
|
||||
if lang == "latex" or filename:match("%.bib$") then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
},
|
||||
|
||||
indent = {
|
||||
enable = true,
|
||||
disable = { "tex", "bib", "markdown" }
|
||||
},
|
||||
indent = {
|
||||
enable = true,
|
||||
disable = { "tex", "bib", "markdown" },
|
||||
},
|
||||
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
}
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
vim.opt.foldlevel = 2
|
||||
vim.opt.foldenable = true
|
||||
-- Better folding setup
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
vim.opt.foldlevel = 20
|
||||
vim.opt.foldenable = false
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user