diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index f8813fe..6fc3237 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,4 +1,3 @@ -require("plugins") -require("options") -require("mappings") -require("colors") +require("config.options") +require("config.mappings") +require("config.plugins") diff --git a/.config/nvim/lua/colors.lua b/.config/nvim/lua/colors.lua deleted file mode 100644 index 83ee97c..0000000 --- a/.config/nvim/lua/colors.lua +++ /dev/null @@ -1,2 +0,0 @@ --- vim.cmd("colorscheme wal") --- vim.cmd("colorscheme monokai") diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/config/mappings.lua similarity index 100% rename from .config/nvim/lua/mappings.lua rename to .config/nvim/lua/config/mappings.lua diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/config/options.lua similarity index 100% rename from .config/nvim/lua/options.lua rename to .config/nvim/lua/config/options.lua diff --git a/.config/nvim/lua/config/plugins.lua b/.config/nvim/lua/config/plugins.lua new file mode 100644 index 0000000..7f21e48 --- /dev/null +++ b/.config/nvim/lua/config/plugins.lua @@ -0,0 +1,13 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +require("lazy").setup("plugins") diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua deleted file mode 100644 index b3263dd..0000000 --- a/.config/nvim/lua/plugins.lua +++ /dev/null @@ -1,274 +0,0 @@ -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) -require("lazy").setup({ - - { - "echasnovski/mini.nvim", - config = function() - require("plugins.mini") - end, - }, - - -- - -- dev - -- - - -- lspconfig - { - "neovim/nvim-lspconfig", - config = function() - require("plugins.lsp") - end, - }, - - -- nvim lint - { - "mfussenegger/nvim-lint", - config = function() - require("plugins.lint") - end, - }, - - -- cmp - { - "hrsh7th/nvim-cmp", - config = function() - require("plugins.cmp") - end, - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-vsnip", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-nvim-lsp-signature-help", - }, - }, - - -- snippets - { - "hrsh7th/vim-vsnip", - config = function() - require("plugins.vsnip") - end, - }, - - "rafamadriz/friendly-snippets", - - -- autopairs - { - "windwp/nvim-autopairs", - config = function() - require("plugins.autopairs") - end, - }, - - -- treesitter - { - "nvim-treesitter/nvim-treesitter", - config = function() - require("plugins.treesitter") - end, - }, - - { - "nvim-treesitter/nvim-treesitter-context", - config = function() - require("plugins.treesitter-context") - end, - }, - - { - "RRethy/nvim-treesitter-textsubjects", - config = function() - require("plugins.treesitter-textobjects") - end, - }, - - -- formatter - { - "mhartington/formatter.nvim", - cmd = { "Format", "FormatWrite" }, - config = function() - require("plugins.formatter") - end, - }, - - -- dap - { - "mfussenegger/nvim-dap", - config = function() - require("plugins.dap") - end, - dependencies = { - "leoluz/nvim-dap-go", - "mfussenegger/nvim-dap-python", - }, - }, - - -- trouble - { - "folke/trouble.nvim", - cmd = { "Trouble", "TroubleToggle" }, - config = function() - require("plugins.trouble") - end, - }, - - -- toggleterm - { - "akinsho/toggleterm.nvim", - cmd = { "ToggleTerm" }, - config = function() - require("plugins.toggleterm") - end, - dependencies = { - "chomosuke/term-edit.nvim", - }, - }, - - -- neogen - { - "danymat/neogen", - config = function() - require("plugins.neogen") - end, - }, - - -- neotest - { - "nvim-neotest/neotest", - config = function() - require("plugins.neotest") - end, - dependencies = { - "antoinemadec/FixCursorHold.nvim", - "nvim-neotest/neotest-python", - }, - keys = { - "n", - }, - }, - - -- refactoring - { - "ThePrimeagen/refactoring.nvim", - config = function() - require("plugins.refactoring") - end, - keys = { - "r", - }, - }, - - -- - -- git - -- - - -- "tpope/vim-fugitive", - { - "TimUntersberger/neogit", - config = function() - require("plugins.neogit") - end, - }, - "sindrets/diffview.nvim", - - -- - -- files (and more) - -- - - -- telescope - { - "nvim-telescope/telescope.nvim", - config = function() - require("plugins.telescope") - end, - dependencies = { - "nvim-lua/plenary.nvim", - }, - }, - - -- nvim tree - { - "kyazdani42/nvim-tree.lua", - config = function() - require("plugins.nvim-tree") - end, - dependencies = { - "kyazdani42/nvim-web-devicons", - }, - cmd = { "NvimTreeOpen", "NvimTreeToggle" }, - }, - - -- - -- looks - -- - - -- lualine - { - "hoob3rt/lualine.nvim", - config = function() - require("plugins.lualine") - end, - }, - - -- - -- colorscheme - -- - - { - "nekonako/xresources-nvim", - config = function() - require('xresources') - end, - }, - - -- - -- telekasten - -- - - { - "renerocksai/telekasten.nvim", - config = function() - require("plugins.telekasten") - end, - dependencies = { - "telescope.nvim", - }, - key = { - "z", - }, - ft = { - "markdown", - }, - }, - - "renerocksai/calendar-vim", - - { - "shortcuts/no-neck-pain.nvim", - config = function() - require("plugins.no-neck-pain") - end, - }, - - { - "folke/which-key.nvim", - key = { - "", - }, - config = function() - require("plugins.which-key") - end, - }, -}) diff --git a/.config/nvim/lua/plugins/autopairs.lua b/.config/nvim/lua/plugins/autopairs.lua index f188c46..4600347 100644 --- a/.config/nvim/lua/plugins/autopairs.lua +++ b/.config/nvim/lua/plugins/autopairs.lua @@ -1,6 +1,11 @@ --- autopairs -require("nvim-autopairs").setup({}) --- insert () after selecting functions -local cmp_autopairs = require("nvim-autopairs.completion.cmp") -local cmp = require("cmp") -cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } })) +return { + "windwp/nvim-autopairs", + config = function() + -- autopairs + require("nvim-autopairs").setup({}) + -- insert () after selecting functions + local cmp_autopairs = require("nvim-autopairs.completion.cmp") + local cmp = require("cmp") + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done({ map_char = { tex = "" } })) + end, +} diff --git a/.config/nvim/lua/plugins/calendar.lua b/.config/nvim/lua/plugins/calendar.lua deleted file mode 100644 index 6295384..0000000 --- a/.config/nvim/lua/plugins/calendar.lua +++ /dev/null @@ -1 +0,0 @@ -vim.g.calendar_no_mappings = true diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index f827e07..b262621 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -1,52 +1,67 @@ -vim.opt.completeopt = { "menuone", "noselect" } +return { + "hrsh7th/nvim-cmp", + config = function() + require("plugins.cmp") + end, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-vsnip", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-nvim-lsp-signature-help", + }, + opts = function() + vim.opt.completeopt = { "menuone", "noselect" } -local cmp = require("cmp") -local neogen = require("neogen") + local cmp = require("cmp") + local neogen = require("neogen") -cmp.setup({ - snippet = { - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) - end, - }, - mapping = { - -- [''] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - -- [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - [""] = cmp.mapping.select_next_item(), - [""] = cmp.mapping.select_prev_item(), - [""] = cmp.mapping.complete(), - [""] = cmp.mapping.close(), - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Replace, - select = false, - }), - [""] = cmp.mapping(function(fallback) - if neogen.jumpable() then - neogen.jump_next() - else - fallback() - end - end, { - "i", - "s", - }), - [""] = cmp.mapping(function(fallback) - if neogen.jumpable(true) then - neogen.jump_prev() - else - fallback() - end - end, { - "i", - "s", - }), - }, - sources = { - { name = "nvim_lsp" }, - { name = "nvim_lsp_signature_help" }, - { name = "path" }, - { name = "buffer", keyword_length = 5 }, - { name = "vsnip" }, - { name = "orgmode" }, - }, -}) + cmp.setup({ + snippet = { + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) + end, + }, + mapping = { + -- [''] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), + -- [''] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.close(), + [""] = cmp.mapping.confirm({ + behavior = cmp.ConfirmBehavior.Replace, + select = false, + }), + [""] = cmp.mapping(function(fallback) + if neogen.jumpable() then + neogen.jump_next() + else + fallback() + end + end, { + "i", + "s", + }), + [""] = cmp.mapping(function(fallback) + if neogen.jumpable(true) then + neogen.jump_prev() + else + fallback() + end + end, { + "i", + "s", + }), + }, + sources = { + { name = "nvim_lsp" }, + { name = "nvim_lsp_signature_help" }, + { name = "path" }, + { name = "buffer", keyword_length = 5 }, + { name = "vsnip" }, + { name = "orgmode" }, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/dap.lua b/.config/nvim/lua/plugins/dap.lua index a159323..fcb608b 100644 --- a/.config/nvim/lua/plugins/dap.lua +++ b/.config/nvim/lua/plugins/dap.lua @@ -1,2 +1,11 @@ -require("dap-go").setup() -require("dap-python").setup() +return { + "mfussenegger/nvim-dap", + config = function() + require("dap-go").setup() + require("dap-python").setup() + end, + dependencies = { + "leoluz/nvim-dap-go", + "mfussenegger/nvim-dap-python", + }, +} diff --git a/.config/nvim/lua/plugins/formatter.lua b/.config/nvim/lua/plugins/formatter.lua index 10f5e92..32ba539 100644 --- a/.config/nvim/lua/plugins/formatter.lua +++ b/.config/nvim/lua/plugins/formatter.lua @@ -1,23 +1,29 @@ -require("formatter").setup({ - filetype = { - lua = { - require("formatter.filetypes.lua").stylua, - }, - go = { - require("formatter.filetypes.go").gofumpt, - require("formatter.filetypes.go").goimports, - }, - json = { - require("formatter.filetypes.json").jq, - }, - python = { - require("formatter.filetypes.python").autopep8, - }, - rust = { - require("formatter.filetypes.rust").rustfmt, - }, - toml = { - require("formatter.filetypes.toml").taplo, - }, - }, -}) +return { + "mhartington/formatter.nvim", + cmd = { "Format", "FormatWrite" }, + config = function() + require("formatter").setup({ + filetype = { + lua = { + require("formatter.filetypes.lua").stylua, + }, + go = { + require("formatter.filetypes.go").gofumpt, + require("formatter.filetypes.go").goimports, + }, + json = { + require("formatter.filetypes.json").jq, + }, + python = { + require("formatter.filetypes.python").autopep8, + }, + rust = { + require("formatter.filetypes.rust").rustfmt, + }, + toml = { + require("formatter.filetypes.toml").taplo, + }, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/lint.lua b/.config/nvim/lua/plugins/lint.lua index 572e249..15efa76 100644 --- a/.config/nvim/lua/plugins/lint.lua +++ b/.config/nvim/lua/plugins/lint.lua @@ -1,6 +1,11 @@ -require("lint").linters_by_ft = { - python = { "mypy" }, - rust = { "ruff" }, -} +return { + "mfussenegger/nvim-lint", + config = function() + require("lint").linters_by_ft = { + python = { "mypy" }, + rust = { "ruff" }, + } -vim.cmd("au BufWrite lua require('lint').try_lint()") + vim.cmd("au BufWrite lua require('lint').try_lint()") + end, +} diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 374fc69..19ee254 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -1,9 +1,14 @@ -local lsp = require("lspconfig") - --- lsp.jedi_language_server.setup{} -lsp.pyright.setup{} -lsp.gopls.setup{} -lsp.rust_analyzer.setup{} -lsp.clangd.setup{} -lsp.lua_ls.setup{} -lsp.solargraph.setup{} +return { + { + "neovim/nvim-lspconfig", + config = function() + lsp = require("lspconfig") + lsp.pyright.setup({}) + lsp.gopls.setup({}) + lsp.rust_analyzer.setup({}) + lsp.clangd.setup({}) + lsp.lua_ls.setup({}) + lsp.solargraph.setup({}) + end, + }, +} diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 35f8193..15b896b 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -1,8 +1,12 @@ --- lualine colorscheme -require("lualine").setup({ - options = { - theme = "auto", - section_separators = { "", "" }, - component_separators = { "", "" }, - }, -}) +return { + "hoob3rt/lualine.nvim", + config = function() + require("lualine").setup({ + options = { + theme = "auto", + section_separators = { "", "" }, + component_separators = { "", "" }, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/mini.lua b/.config/nvim/lua/plugins/mini.lua deleted file mode 100644 index b752c35..0000000 --- a/.config/nvim/lua/plugins/mini.lua +++ /dev/null @@ -1,17 +0,0 @@ -require("mini.ai").setup() -require("mini.bracketed").setup() -require("mini.comment").setup() -require("mini.move").setup() -require("mini.starter").setup() -require("mini.tabline").setup() -require("mini.surround").setup({ - mappings = { - add = "sa", - delete = "sd", - find = "sf", - find_left = "sF", - highlight = "sh", - replace = "sr", - update_n_lines = "sn", - }, -}) diff --git a/.config/nvim/lua/plugins/neogen.lua b/.config/nvim/lua/plugins/neogen.lua index f79a746..35744ce 100644 --- a/.config/nvim/lua/plugins/neogen.lua +++ b/.config/nvim/lua/plugins/neogen.lua @@ -1,9 +1,14 @@ -require("neogen").setup({ - languages = { - python = { - template = { - annotation_convention = "reST", +return { + "danymat/neogen", + config = function() + require("neogen").setup({ + languages = { + python = { + template = { + annotation_convention = "reST", + }, + }, }, - }, - }, -}) + }) + end, +} diff --git a/.config/nvim/lua/plugins/neogit.lua b/.config/nvim/lua/plugins/neogit.lua index 09b1fff..1c7c3d5 100644 --- a/.config/nvim/lua/plugins/neogit.lua +++ b/.config/nvim/lua/plugins/neogit.lua @@ -1,7 +1,15 @@ -local neogit = require("neogit") - -neogit.setup({ - integrations = { - diffview = true, +return { + "TimUntersberger/neogit", + dependencies = { + "sindrets/diffview.nvim", }, -}) + config = function() + local neogit = require("neogit") + + neogit.setup({ + integrations = { + diffview = true, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/neotest.lua b/.config/nvim/lua/plugins/neotest.lua index d948dd6..2192935 100644 --- a/.config/nvim/lua/plugins/neotest.lua +++ b/.config/nvim/lua/plugins/neotest.lua @@ -1,7 +1,19 @@ -require("neotest").setup({ - adapters = { - require("neotest-python")({ - runner = "pytest", - }), +return { + "nvim-neotest/neotest", + config = function() + require("neotest").setup({ + adapters = { + require("neotest-python")({ + runner = "pytest", + }), + }, + }) + end, + dependencies = { + "antoinemadec/FixCursorHold.nvim", + "nvim-neotest/neotest-python", }, -}) + keys = { + "n", + }, +} diff --git a/.config/nvim/lua/plugins/no-neck-pain.lua b/.config/nvim/lua/plugins/no-neck-pain.lua index cbc860f..4f59419 100644 --- a/.config/nvim/lua/plugins/no-neck-pain.lua +++ b/.config/nvim/lua/plugins/no-neck-pain.lua @@ -1,7 +1,12 @@ -require("no-neck-pain").setup({ - buffers = { - right = { - enabled = false, - }, - }, -}) +return { + "shortcuts/no-neck-pain.nvim", + config = function() + require("no-neck-pain").setup({ + buffers = { + right = { + enabled = false, + }, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/nvim-tree.lua b/.config/nvim/lua/plugins/nvim-tree.lua index 3be86c8..7a85ea2 100644 --- a/.config/nvim/lua/plugins/nvim-tree.lua +++ b/.config/nvim/lua/plugins/nvim-tree.lua @@ -1,13 +1,22 @@ --- nvim tree -require("nvim-tree").setup({ - update_cwd = true, - diagnostics = { - enable = true, - }, -}) +return { + "kyazdani42/nvim-tree.lua", + config = function() + -- nvim tree + require("nvim-tree").setup({ + update_cwd = true, + diagnostics = { + enable = true, + }, + }) --- close tab/vim when nvim-tree is the last window in the tab -vim.api.nvim_create_autocmd("BufEnter", { - pattern = "*", - command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif", -}) + -- close tab/vim when nvim-tree is the last window in the tab + vim.api.nvim_create_autocmd("BufEnter", { + pattern = "*", + command = "if winnr('$') == 1 && bufname() == 'NvimTree_' . tabpagenr() | quit | endif", + }) + end, + dependencies = { + "kyazdani42/nvim-web-devicons", + }, + cmd = { "NvimTreeOpen", "NvimTreeToggle" }, +} diff --git a/.config/nvim/lua/plugins/refactoring.lua b/.config/nvim/lua/plugins/refactoring.lua index cbdc215..cb8d271 100644 --- a/.config/nvim/lua/plugins/refactoring.lua +++ b/.config/nvim/lua/plugins/refactoring.lua @@ -1 +1,9 @@ -require("refactoring").setup() +return { + "ThePrimeagen/refactoring.nvim", + config = function() + require("refactoring").setup() + end, + keys = { + "r", + }, +} diff --git a/.config/nvim/lua/plugins/telekasten.lua b/.config/nvim/lua/plugins/telekasten.lua index b6c6dd4..5557eb3 100644 --- a/.config/nvim/lua/plugins/telekasten.lua +++ b/.config/nvim/lua/plugins/telekasten.lua @@ -1,2 +1,17 @@ -local home = vim.fn.expand("~/docs/zettelkasten") -require("telekasten").setup({ home = home }) +return { + "renerocksai/telekasten.nvim", + config = function() + local home = vim.fn.expand("~/docs/zettelkasten") + require("telekasten").setup({ home = home }) + vim.g.calendar_no_mappings = true + end, + dependencies = { + "renerocksai/calendar-vim", + }, + key = { + "z", + }, + ft = { + "markdown", + }, +} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 0af6ef0..1e33fae 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -1,13 +1,20 @@ --- telescope settings -require("telescope").setup({ - defaults = { - -- sorting - file_sorter = require("telescope.sorters").get_fzy_sorter, - generic_sorter = require("telescope.sorters").get_fzy_sorter, +return { + "nvim-telescope/telescope.nvim", + config = function() + require("telescope").setup({ + defaults = { + -- sorting + file_sorter = require("telescope.sorters").get_fzy_sorter, + generic_sorter = require("telescope.sorters").get_fzy_sorter, + }, + pickers = { + colorscheme = { + enable_preview = true, + }, + }, + }) + end, + dependencies = { + "nvim-lua/plenary.nvim", }, - pickers = { - colorscheme = { - enable_preview = true, - }, - }, -}) +} diff --git a/.config/nvim/lua/plugins/toggleterm.lua b/.config/nvim/lua/plugins/toggleterm.lua index 9251f8f..ac8db2a 100644 --- a/.config/nvim/lua/plugins/toggleterm.lua +++ b/.config/nvim/lua/plugins/toggleterm.lua @@ -1,7 +1,16 @@ -vim.o.hidden = true -require("toggleterm").setup({ - start_in_insert = false, -}) -require("term-edit").setup({ - prompt_end = "%$ ", -}) +return { + "akinsho/toggleterm.nvim", + cmd = { "ToggleTerm" }, + config = function() + vim.o.hidden = true + require("toggleterm").setup({ + start_in_insert = false, + }) + require("term-edit").setup({ + prompt_end = "%$ ", + }) + end, + dependencies = { + "chomosuke/term-edit.nvim", + }, +} diff --git a/.config/nvim/lua/plugins/treesitter-context.lua b/.config/nvim/lua/plugins/treesitter-context.lua index 5d209ad..19dd015 100644 --- a/.config/nvim/lua/plugins/treesitter-context.lua +++ b/.config/nvim/lua/plugins/treesitter-context.lua @@ -1 +1,18 @@ -require("treesitter-context").setup() +return { + "nvim-treesitter/nvim-treesitter-context", + "RRethy/nvim-treesitter-textsubjects", + config = function() + require("treesitter-context").setup() + require("nvim-treesitter.configs").setup({ + textsubjects = { + enable = true, + prev_selection = ",", -- (Optional) keymap to select the previous selection + keymaps = { + ["."] = "textsubjects-smart", + [";"] = "textsubjects-container-outer", + ["i;"] = "textsubjects-container-inner", + }, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/treesitter-textobjects.lua b/.config/nvim/lua/plugins/treesitter-textobjects.lua deleted file mode 100644 index c90b52c..0000000 --- a/.config/nvim/lua/plugins/treesitter-textobjects.lua +++ /dev/null @@ -1,11 +0,0 @@ -require("nvim-treesitter.configs").setup({ - textsubjects = { - enable = true, - prev_selection = ",", -- (Optional) keymap to select the previous selection - keymaps = { - ["."] = "textsubjects-smart", - [";"] = "textsubjects-container-outer", - ["i;"] = "textsubjects-container-inner", - }, - }, -}) diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 7592aa4..31d94cb 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -1,5 +1,10 @@ -require("nvim-treesitter.configs").setup({ - highlight = { - enable = true, - }, -}) +return { + "nvim-treesitter/nvim-treesitter", + config = function() + require("nvim-treesitter.configs").setup({ + highlight = { + enable = true, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/trouble.lua b/.config/nvim/lua/plugins/trouble.lua index 38ef1e9..50ba49c 100644 --- a/.config/nvim/lua/plugins/trouble.lua +++ b/.config/nvim/lua/plugins/trouble.lua @@ -1 +1,8 @@ -require("trouble").setup() +return { + "folke/trouble.nvim", + cmd = { "Trouble", "TroubleToggle" }, + config = function() + require("plugins.trouble") + require("trouble").setup() + end, +} diff --git a/.config/nvim/lua/plugins/vsnip.lua b/.config/nvim/lua/plugins/vsnip.lua index 2211417..9557024 100644 --- a/.config/nvim/lua/plugins/vsnip.lua +++ b/.config/nvim/lua/plugins/vsnip.lua @@ -1,7 +1,19 @@ --- jumpable mappings -vim.api.nvim_exec([[ +return { + "hrsh7th/vim-vsnip", + + dependencies = { + "rafamadriz/friendly-snippets", + }, + config = function() + -- jumpable mappings + vim.api.nvim_exec( + [[ imap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' smap vsnip#jumpable(1) ? '(vsnip-jump-next)' : '' imap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' smap vsnip#jumpable(-1) ? '(vsnip-jump-prev)' : '' -]], false) +]], + false + ) + end, +} diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index 3e80221..ab59208 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -1,12 +1,20 @@ -local wk = require("which-key") -wk.register({ - a = { name = "actions" }, - c = { name = "terminal" }, - d = { name = "debug" }, - f = { name = "files" }, - g = { name = "lsp" }, - n = { name = "testing" }, - r = { name = "refactoring" }, - t = { name = "telescope" }, - v = { name = "vcs" }, -}, { prefix = "" }) +return { + "folke/which-key.nvim", + key = { + "", + }, + config = function() + local wk = require("which-key") + wk.register({ + a = { name = "actions" }, + c = { name = "terminal" }, + d = { name = "debug" }, + f = { name = "files" }, + g = { name = "lsp" }, + n = { name = "testing" }, + r = { name = "refactoring" }, + t = { name = "telescope" }, + v = { name = "vcs" }, + }, { prefix = "" }) + end, +} diff --git a/.config/nvim/lua/plugins/xresources.lua b/.config/nvim/lua/plugins/xresources.lua new file mode 100644 index 0000000..cafbeea --- /dev/null +++ b/.config/nvim/lua/plugins/xresources.lua @@ -0,0 +1,6 @@ +return { + "nekonako/xresources-nvim", + config = function() + require("xresources") + end, +}