From 8b28075f40e591740176d06243b6af8bc4dc8e4b Mon Sep 17 00:00:00 2001 From: liph Date: Thu, 5 Feb 2026 15:31:17 +0100 Subject: [PATCH] fixed nvim setup? --- nvim/.config/nvim/init.lua | 15 ++-- nvim/.config/nvim/lazy-lock.json | 2 +- .../.config/nvim/lua/plugins/colorschemes.lua | 2 +- nvim/.config/nvim/lua/plugins/treesitter.lua | 79 ++++++++++--------- 4 files changed, 50 insertions(+), 48 deletions(-) diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index a495605..d237b15 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -38,9 +38,13 @@ vim.filetype.add({ }) require("vim-options") -require('lazy').setup('plugins', { - rocks = { enabled = false }, + +-- SINGLE lazy.setup call - combine everything here +require("lazy").setup({ + -- Load plugins from the plugins directory + { import = "plugins" }, }) + require("lualine").setup({ sections = { lualine_x = { @@ -52,13 +56,6 @@ require("lualine").setup({ }, }, }) -require("lazy").setup({ - { - "tzachar/cmp-tabnine", - build = "./install.sh", - dependencies = "hrsh7th/nvim-cmp", - }, -}) -- In your init.lua or after lazy setup local theme_file = vim.fn.stdpath("config") .. "/lua/current_theme.lua" diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 04c120b..7384ec8 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -65,5 +65,5 @@ "trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" }, "vimtex": { "branch": "master", "commit": "f707368022cdb851716be0d2970b90599c84a6a6" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }, - "yazi.nvim": { "branch": "main", "commit": "02d5086bee04e0c861afeed8ce48988c89b19f9d" } + "yazi.nvim": { "branch": "main", "commit": "b3df5d00bbf5cd862b853993135598f12b2eb3b5" } } diff --git a/nvim/.config/nvim/lua/plugins/colorschemes.lua b/nvim/.config/nvim/lua/plugins/colorschemes.lua index 42c0388..399ba5c 100644 --- a/nvim/.config/nvim/lua/plugins/colorschemes.lua +++ b/nvim/.config/nvim/lua/plugins/colorschemes.lua @@ -70,7 +70,7 @@ return { }, { "sainnhe/sonokai", - lazy = false, -- Load during startup since it's a colorscheme + lazy = false, -- Load during startup since it's a colorscheme config = function() vim.g.sonokai_style = "shusia" -- default, atlantis, shusia, espresso diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua index c913775..67bc476 100644 --- a/nvim/.config/nvim/lua/plugins/treesitter.lua +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -1,44 +1,49 @@ --- treesitter.lua: Enables syntax highlighting, code folding, and structural analysis. - return { + -- Core nvim-treesitter plugin { "nvim-treesitter/nvim-treesitter", - build = ":TSUpdate", + build = ":TSUpdate", -- Updates parsers on install + config = true, -- Let lazy.nvim auto-call .setup() with opts + opts = { + ensure_installed = { + "lua", + "vim", + "vimdoc", + "markdown", + "java", + "yaml", + "latex", + "r", + "query", + "python", + "javascript", + "typescript", + "rust", + "go", + "bash", + "c", + "cpp", + "html", + }, + sync_install = false, + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = false, + }, + indent = { + enable = true, + }, + }, + }, + + -- Textobjects plugin that depends on the core plugin + { + "nvim-treesitter/nvim-treesitter-textobjects", + dependencies = { "nvim-treesitter/nvim-treesitter" }, config = function() - local config = require("nvim-treesitter.configs") - config.setup({ - ensure_installed = { - "markdown", - "markdown_inline", - -- Your code block languages - "python", - "java", - "sql", - "bash", - "html", - -- Other languages you use - "lua", - "vim", - "latex", - "r", - "rnoweb", -- for Sweave files - "yaml", -- for YAML headers in Rmdkk - }, - - -- Auto install missing parsers - auto_install = true, - - -- -- Enable syntax highlighting - -- highlight = { - -- enable = true, - -- -- Optional: disable markdown highlighting if render-markdown handles it - -- disable = { "latex", "tex" }, -- Disable for LaTeX - -- }, - -- Enable indentation - indent = { - enable = true, - }, - }) + -- Configuration is integrated into the main setup + -- No need to call require() here end, }, }