diff options
author | David Runge <dave@sleepmap.de> | 2022-12-21 22:23:18 +0100 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2022-12-21 22:23:18 +0100 |
commit | 8abbcfd645c517424a5a57bc8bba10c551560126 (patch) | |
tree | af180e423070c36c08be4845bd1bc7d3e2323ee0 /.config/nvim | |
parent | b8c1b03f340516dbf37cc2426b2b74d5f494daeb (diff) | |
download | dotfiles-8abbcfd645c517424a5a57bc8bba10c551560126.tar.gz dotfiles-8abbcfd645c517424a5a57bc8bba10c551560126.tar.bz2 dotfiles-8abbcfd645c517424a5a57bc8bba10c551560126.tar.xz dotfiles-8abbcfd645c517424a5a57bc8bba10c551560126.zip |
nvim: Add tree-sitter integration
.config/nvim/init.lua:
Add tree-sitter integration.
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/init.lua | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index b554b81..13e7619 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -70,7 +70,10 @@ vim.api.nvim_create_autocmd({'BufNewFile', 'BufRead'}, { -- ale: https://github.com/dense-analysis/ale vim.g['ale_completion_enabled'] = 1 -vim.g['ale_linters'] = { ['rust'] = {'rustc', 'analyzer'} } +vim.g['ale_linters'] = { + ['rust'] = {'rustc', 'analyzer'}, + ['python'] = {'bandit', 'flake8', 'mypy', 'pydocstyle', 'pyright'}, +} vim.opt.omnifunc = 'ale#completion#OmniFunc' -- scnvim: https://github.com/davidgranstrom/scnvim @@ -201,3 +204,47 @@ require('lspconfig')['rust_analyzer'].setup{ } } } + +-- treesitter: https://github.com/nvim-treesitter/nvim-treesitter +vim.opt.runtimepath:append("~/.local/state/nvim/parsers/") +require'nvim-treesitter.configs'.setup { + ensure_installed = { + "bash", + "c", + "cmake", + "cpp", + "diff", + "git_rebase", + "gitattributes", + "gitcommit", + "gitignore", + "go", + "html", + "latex", + "lua", + "make", + "markdown", + "meson", + "ninja", + "php", + "python", + "regex", + "rst", + "rust", + -- "sql", + "supercollider", + -- "toml", + "typescript", + "vim", + "yaml", + "zig", + }, + sync_install = false, + auto_install = false, + ignore_install = { "javascript" }, + parser_install_dir = "~/.local/state/nvim/parsers/", + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, +} |