diff options
| author | Skladnayazebra <skladnayazebra@gmail.com> | 2026-04-04 21:18:45 +0200 |
|---|---|---|
| committer | Skladnayazebra <skladnayazebra@gmail.com> | 2026-04-04 21:18:45 +0200 |
| commit | 5938a465dbbf910ca0609a1db9ac13d52616af7e (patch) | |
| tree | 14d70b052e32edc190d7304555fc958eb0ed6ec0 | |
| parent | feae0fffe6c39eb2732c7afbd16599f949a00b3d (diff) | |
nvim: refactor plugins config; add tree-sitter with proper config this time
| -rw-r--r-- | nvim/lazy-lock.json | 1 | ||||
| -rw-r--r-- | nvim/lua/config/lazy.lua | 61 | ||||
| -rw-r--r-- | nvim/lua/config/plugins.lua | 61 | ||||
| -rw-r--r-- | nvim/lua/config/plugins/blink-cmp.lua (renamed from nvim/lua/config/blink-cmp.lua) | 0 | ||||
| -rw-r--r-- | nvim/lua/config/plugins/fzf.lua (renamed from nvim/lua/config/fzf.lua) | 0 | ||||
| -rw-r--r-- | nvim/lua/config/plugins/tree-sitter.lua | 27 |
6 files changed, 90 insertions, 60 deletions
diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 5298e33..e40f40e 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -11,6 +11,7 @@ "mini.icons": { "branch": "main", "commit": "7fdae2443a0e2910015ca39ad74b50524ee682d3" }, "nvim-lspconfig": { "branch": "master", "commit": "9ccd58a7949091c0cc2777d4e92a45a209c808c1" }, "nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" }, + "nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" }, "nvim-web-devicons": { "branch": "master", "commit": "40e9d5a6cc3db11b309e39593fc7ac03bb844e38" }, "schemastore.nvim": { "branch": "main", "commit": "6d0329adb9c8cbe51b9a28299890a5eb104db7dc" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, diff --git a/nvim/lua/config/lazy.lua b/nvim/lua/config/lazy.lua index 3cc2b8d..8a4118f 100644 --- a/nvim/lua/config/lazy.lua +++ b/nvim/lua/config/lazy.lua @@ -24,66 +24,7 @@ vim.g.maplocalleader = "\\" -- Setup lazy.nvim require("lazy").setup({ -- Plugins - spec = { - -- Color scheme - { "ellisonleao/gruvbox.nvim", priority = 1000, config = true }, - -- Git integration - { "tpope/vim-fugitive" }, - -- Shows git diff info in the gutter - { "lewis6991/gitsigns.nvim" }, - -- comment gestures - { "numToStr/Comment.nvim" }, - -- Fuzzy finder - { - "ibhagwan/fzf-lua", - config = function() - require("config.fzf") - end, - dependencies = { "nvim-tree/nvim-web-devicons" }, - opts = {}, - }, - -- Wrap text into quotes/parens - { - "kylechui/nvim-surround", - version = "^3.0.0", -- stable, use main for latest - event = "VeryLazy", - config = function() - require("nvim-surround").setup({}) - end - }, - { "prettier/vim-prettier" }, - { "neovim/nvim-lspconfig" }, - { "b0o/schemastore.nvim" }, - { - "nvim-mini/mini.files", - branch = "main", - dependencies = { "nvim-mini/mini.icons" }, - config = function() - require('mini.files').setup({ - mappings = { - go_in_plus = '<CR>', - }, - windows = { - preview = true, - } - }) - end, - }, - require("config.blink-cmp"), - { - "f-person/auto-dark-mode.nvim", - opts = { - set_dark_mode = function() - vim.api.nvim_set_option_value("background", "dark", {}) - end, - set_light_mode = function() - vim.api.nvim_set_option_value("background", "light", {}) - end, - update_interval = 3000, - fallback = "dark", - } - }, - }, + spec = require('config.plugins'), install = { colorscheme = { "gruvbox" } }, checker = { enabled = true, notify = false }, }) diff --git a/nvim/lua/config/plugins.lua b/nvim/lua/config/plugins.lua new file mode 100644 index 0000000..c9496e3 --- /dev/null +++ b/nvim/lua/config/plugins.lua @@ -0,0 +1,61 @@ +return { + -- Color scheme + { "ellisonleao/gruvbox.nvim", priority = 1000, config = true }, + -- Git integration + { "tpope/vim-fugitive" }, + -- Shows git diff info in the gutter + { "lewis6991/gitsigns.nvim" }, + -- comment gestures + { "numToStr/Comment.nvim" }, + -- Fuzzy finder + { + "ibhagwan/fzf-lua", + config = function() + require("config.plugins.fzf") + end, + dependencies = { "nvim-tree/nvim-web-devicons" }, + opts = {}, + }, + -- Wrap text into quotes/parens + { + "kylechui/nvim-surround", + version = "^3.0.0", -- stable, use main for latest + event = "VeryLazy", + config = function() + require("nvim-surround").setup({}) + end + }, + { "prettier/vim-prettier" }, + { "neovim/nvim-lspconfig" }, + { "b0o/schemastore.nvim" }, + { + "nvim-mini/mini.files", + branch = "main", + dependencies = { "nvim-mini/mini.icons" }, + config = function() + require('mini.files').setup({ + mappings = { + go_in_plus = '<CR>', + }, + windows = { + preview = false, + } + }) + end, + }, + require("config.plugins.blink-cmp"), + require("config.plugins.tree-sitter"), + { + "f-person/auto-dark-mode.nvim", + opts = { + set_dark_mode = function() + vim.api.nvim_set_option_value("background", "dark", {}) + end, + set_light_mode = function() + vim.api.nvim_set_option_value("background", "light", {}) + end, + update_interval = 3000, + fallback = "dark", + } + }, +} diff --git a/nvim/lua/config/blink-cmp.lua b/nvim/lua/config/plugins/blink-cmp.lua index c9c0447..c9c0447 100644 --- a/nvim/lua/config/blink-cmp.lua +++ b/nvim/lua/config/plugins/blink-cmp.lua diff --git a/nvim/lua/config/fzf.lua b/nvim/lua/config/plugins/fzf.lua index d50ca35..d50ca35 100644 --- a/nvim/lua/config/fzf.lua +++ b/nvim/lua/config/plugins/fzf.lua diff --git a/nvim/lua/config/plugins/tree-sitter.lua b/nvim/lua/config/plugins/tree-sitter.lua new file mode 100644 index 0000000..d37f98b --- /dev/null +++ b/nvim/lua/config/plugins/tree-sitter.lua @@ -0,0 +1,27 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + branch = 'master', + lazy = false, + build = ":TSUpdate", + config = function() + require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" (the listed parsers MUST always be installed) + ensure_installed = { "c", "lua", "vim", "vimdoc", "query", "markdown", "markdown_inline" }, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + + highlight = { + enable = true, + -- 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, + }, + } + end + } +} |
