From ecc77878606913b0819171740c1d3e125736e4f6 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sun, 30 Jan 2022 12:52:15 -0600 Subject: nvim: change how plugin configuration gets invoked --- nvim/.config/nvim/init.vim | 1 - nvim/.config/nvim/lua/plugins.lua | 3 ++- nvim/.config/nvim/lua/treesitter.lua | 24 ------------------------ nvim/.config/nvim/lua/treesitter_config.lua | 24 ++++++++++++++++++++++++ 4 files changed, 26 insertions(+), 26 deletions(-) delete mode 100644 nvim/.config/nvim/lua/treesitter.lua create mode 100644 nvim/.config/nvim/lua/treesitter_config.lua (limited to 'nvim/.config/nvim') diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index b630ad8..a741db2 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -1,5 +1,4 @@ lua require('plugins') -lua require('treesitter') set nocompatible " disable compatibility to old-time vi set showmatch " show matching brackets. diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 6da88ad..818b1d2 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -21,7 +21,8 @@ return require('packer').startup(function() -- Tree Sitter use { 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate' + run = ':TSUpdate', + config = function() require('treesitter_config') end } end) diff --git a/nvim/.config/nvim/lua/treesitter.lua b/nvim/.config/nvim/lua/treesitter.lua deleted file mode 100644 index 8e4d4a8..0000000 --- a/nvim/.config/nvim/lua/treesitter.lua +++ /dev/null @@ -1,24 +0,0 @@ -require("nvim-treesitter.configs").setup { - -- one of "all", "maintained" (parsers with maintainers), or a list of languages - ensure_installed = "maintained", - - -- install languages synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- List of parsers to ignore installing - -- ignore_install = { "javascript" }, - - highlight = { - -- false will disable the whole extension - enable = true, - - -- list of language that will be disabled - -- disable = { "c", "rust" }, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} diff --git a/nvim/.config/nvim/lua/treesitter_config.lua b/nvim/.config/nvim/lua/treesitter_config.lua new file mode 100644 index 0000000..8e4d4a8 --- /dev/null +++ b/nvim/.config/nvim/lua/treesitter_config.lua @@ -0,0 +1,24 @@ +require("nvim-treesitter.configs").setup { + -- one of "all", "maintained" (parsers with maintainers), or a list of languages + ensure_installed = "maintained", + + -- install languages synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- List of parsers to ignore installing + -- ignore_install = { "javascript" }, + + highlight = { + -- false will disable the whole extension + enable = true, + + -- list of language that will be disabled + -- disable = { "c", "rust" }, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +} -- cgit v1.2.3