nvim: move to lazy package manager
This commit is contained in:
95
.config/nvim/lua/plugins/treesitter.lua
Normal file
95
.config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,95 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
dependencies = {
|
||||
'mizlan/iswap.nvim',
|
||||
'romgrk/nvim-treesitter-context',
|
||||
--"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
--"nvim-treesitter/playground",
|
||||
},
|
||||
build = ':TSUpdate',
|
||||
config = function()
|
||||
-- Tree-sitter configuration
|
||||
|
||||
ts = require'nvim-treesitter.configs'
|
||||
|
||||
ts.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
ensure_installed = {
|
||||
"arduino",
|
||||
"awk",
|
||||
"bash",
|
||||
"bibtex",
|
||||
"c",
|
||||
"cmake",
|
||||
"comment",
|
||||
"cpp",
|
||||
"devicetree",
|
||||
"diff",
|
||||
"fish",
|
||||
"gitattributes",
|
||||
"gitcommit",
|
||||
"gitignore",
|
||||
"help",
|
||||
"http",
|
||||
"ini",
|
||||
"jq",
|
||||
"json",
|
||||
"latex",
|
||||
"lua",
|
||||
"make",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"ninja",
|
||||
"proto",
|
||||
"python",
|
||||
"regex",
|
||||
"rust",
|
||||
"toml",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
-- disabled, since it mostly shifts to four characters
|
||||
--indent = {
|
||||
-- enable = true,
|
||||
--},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "ti",
|
||||
node_incremental = "ti",
|
||||
scope_incremental = "ts",
|
||||
node_decremental = "td",
|
||||
},
|
||||
},
|
||||
rainbow = {
|
||||
enable = true,
|
||||
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for
|
||||
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean
|
||||
max_file_lines = 5000, -- Do not enable for files with more than n lines, int
|
||||
-- colors = {}, -- table of hex strings
|
||||
-- termcolors = {} -- table of colour name strings
|
||||
},
|
||||
--textobjects = {
|
||||
-- swap = {
|
||||
-- enable = true,
|
||||
-- swap_next = {
|
||||
-- ["tan"] = "@parameter.inner",
|
||||
-- },
|
||||
-- swap_previous = {
|
||||
-- ["tap"] = "@parameter.inner",
|
||||
-- },
|
||||
-- },
|
||||
--},
|
||||
matchup = {
|
||||
enable = true,
|
||||
-- disable = { "c", "ruby" },
|
||||
include_match_words
|
||||
},
|
||||
}
|
||||
vim.opt.foldmethod = "expr"
|
||||
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user