Nvim: sync development setup from viessmann machine

This commit is contained in:
Robert Kmieć
2022-01-27 22:54:54 +01:00
parent 6c8a1386a5
commit 88e3532a64
10 changed files with 217 additions and 110 deletions

View File

@@ -1,11 +1,12 @@
" Tree-sitter configuration
lua <<EOF
require'nvim-treesitter.configs'.setup {
ts = require'nvim-treesitter.configs'
ts.setup {
highlight = {
enable = true,
},
indentation = {
enable = true,
additional_vim_regex_highlighting = true,
},
ensure_installed = {
"bash",
@@ -15,9 +16,41 @@ require'nvim-treesitter.configs'.setup {
"fish",
"lua",
"rust",
}
},
-- disabled, since it mostly shifts to four characters
--indent = {
-- enable = true,
--},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "tis",
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 = nil, -- 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",
},
},
},
}
vim.opt.foldmethod = "expr"
vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
--vim.opt.foldmethod = "expr"
--vim.opt.foldexpr = "nvim_treesitter#foldexpr()"
EOF