From f4fa48ed390d7e3dea6517d05005ed58e7490716 Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Tue, 25 Jul 2023 18:25:24 +0200 Subject: [PATCH] add treesitter with color customization --- lua/lang.lua | 20 ++++++++++++++++++++ lua/plugins.lua | 2 ++ 2 files changed, 22 insertions(+) diff --git a/lua/lang.lua b/lua/lang.lua index acdf3c9..d538d7c 100644 --- a/lua/lang.lua +++ b/lua/lang.lua @@ -61,6 +61,26 @@ local on_attach = function(client, bufnr) end end +require('nvim-treesitter.configs').setup { + ensure_installed = { "lua", "rust", "elm", "python", "toml" }, + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting=false, + }, + ident = { + enable = true, + }, + rainbow = { + enable = true, + extended_mode = false, + max_file_lines = nil, + } +} +vim.api.nvim_set_hl(0, "@variable", { }) +vim.api.nvim_set_hl(0, "@parameter", { }) + + local nvim_lsp = require('lspconfig') local capabilities = vim.lsp.protocol.make_client_capabilities() diff --git a/lua/plugins.lua b/lua/plugins.lua index 12a05bd..c0035ea 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -9,6 +9,8 @@ return require('packer').startup(function() requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}} } + use 'nvim-treesitter/nvim-treesitter' + use { 'nvim-tree/nvim-tree.lua', requires = 'nvim-tree/nvim-web-devicons',