damn treesitter

This commit is contained in:
Tyrel Souza 2023-03-09 11:36:23 -05:00
parent 5c42645b30
commit f0c7bc619a
No known key found for this signature in database
GPG Key ID: F3614B02ACBE438E
3 changed files with 25 additions and 26 deletions

View File

@ -125,27 +125,20 @@ return require('packer').startup(function(use)
},
})
require('nvim-treesitter.configs').setup {
ensure_installed = {
"bash", "c", "c_sharp", "cmake", "cpp", "css", "diff", "dockerfile", "fish", "git_rebase",
"gitattributes", "gitcommit", "gitignore", "go", "gomod", "html", "htmldjango", "http", "ini",
"java", "javascript", "jq", "jsdoc", "json", "json5", "jsonc", "llvm", "lua", "m68k", "make",
"markdown", "markdown_inline", "nix", "python", "rst", "ruby", "rust", "scss", "sql", "terraform",
"toml", "tsx", "typescript", "vim", "vue", "yaml"
},
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting=false,
},
ident = { enable = true },
rainbow = {
enable = true,
extended_mode = true,
max_file_lines = nil,
}
}
require("nvim-treesitter.configs").setup({
highlight = { enable = false, disable = { "lua" } },
indent = { enable = true },
refactor = { highlight_definitions = { enable = true } },
incremental_selection = { enable = true },
matchup = { enable = true },
textsubjects = {
enable = true,
prev_selection = ",",
keymaps = {
["."] = "textsubjects-smart",
},
},
})
-- KEYS

View File

@ -68,5 +68,8 @@ return function(use)
use({'puremourning/vimspector'})
use({'nvim-treesitter/nvim-treesitter-refactor'})
use({'RRethy/nvim-treesitter-textsubjects'})
end

View File

@ -27,13 +27,16 @@
# # Inject tree-sitters, since they're annoying to maintain with sideloading
# (nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars))
#];
plugins = [
pkgs.vimPlugins.nvim-treesitter.withAllGrammars
];
# We used to manage our own init.lua but now we want the home-manager
# managed init.vim to load our init.lua which makes this a little dirty.
# extraConfig = ''
# lua << EOF
# ${builtins.readFile ../../home/config/nvim/init.lua}
# EOF
# '';
extraConfig = ''
lua << EOF
${builtins.readFile ../../home/config/nvim/init.lua}
EOF
'';
};
programs.fish = {