diff options
Diffstat (limited to 'neovim/.config/nvim/lua/plugins')
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/codecompanion.lua | 33 | ||||
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/gen.lua | 7 | ||||
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/lspsaga.lua | 6 | ||||
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/nvim_dap.lua | 14 | ||||
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua | 21 | ||||
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/pytest.lua | 29 | ||||
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/telescope.lua | 9 | ||||
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/venv_selector.lua | 1 |
8 files changed, 63 insertions, 57 deletions
diff --git a/neovim/.config/nvim/lua/plugins/codecompanion.lua b/neovim/.config/nvim/lua/plugins/codecompanion.lua index b05497c..75da038 100644 --- a/neovim/.config/nvim/lua/plugins/codecompanion.lua +++ b/neovim/.config/nvim/lua/plugins/codecompanion.lua @@ -6,26 +6,33 @@ return { "nvim-treesitter/nvim-treesitter", }, opts = { - adapters = { - qwen = function() - return require('codecompanion.adapters').extend('ollama', { - name = 'qwen', - schema = { - model = { - default = 'qwen2.5-coder:3b', - }, - }, - }) - end, - }, strategies = { chat = { - adapter = 'qwen', + adapter = 'ollama', + model = 'quen2.5-coder:1.5b', }, inline = { adapter = 'qwen', + adapter = 'ollama', + model = 'quen2.5-coder:1.5b', + }, + actions = { + adapter = 'qwen', + adapter = 'ollama', + model = 'quen2.5-coder:1.5b', }, }, + adapters = { + acp = { + claude_code = function() + return require("codecompanion.adapters").extend("claude_code", { + env = { + CLAUDE_CODE_OAUTH_TOKEN = "CLAUDE_OAUTH_TOKEN" + }, + }) + end, + } + } }, }, } diff --git a/neovim/.config/nvim/lua/plugins/gen.lua b/neovim/.config/nvim/lua/plugins/gen.lua deleted file mode 100644 index 55e85b6..0000000 --- a/neovim/.config/nvim/lua/plugins/gen.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - 'David-Kunz/gen.nvim', - opts = { - model = 'qwen2.5-coder:3b', - display_mode = 'split', - } -} diff --git a/neovim/.config/nvim/lua/plugins/lspsaga.lua b/neovim/.config/nvim/lua/plugins/lspsaga.lua index 27173ec..be1170b 100644 --- a/neovim/.config/nvim/lua/plugins/lspsaga.lua +++ b/neovim/.config/nvim/lua/plugins/lspsaga.lua @@ -19,10 +19,10 @@ return { }, keys = { { "gh", "<cmd>Lspsaga finder<CR>", desc = "Lspsaga finder" }, - { "<leader>cx", "<cmd>Lspsaga code_action<CR>", desc = "Lspsaga codeaction" }, - { "<leader>cx", "<cmd><C-U>Lspsaga range_code_action<CR>", mode = "v", desc = "Lspsaga codeaction" }, + { "g.", "<cmd>Lspsaga code_action<CR>", desc = "Lspsaga codeaction" }, + { "g.", "<cmd><C-U>Lspsaga range_code_action<CR>", mode = "v", desc = "Lspsaga codeaction" }, { "K", "<cmd>Lspsaga hover_doc<CR>", desc = "Lspsaga hover doc" }, - { "<leader>rn", "<cmd>Lspsaga rename<CR>", desc = "Lspsaga rename" }, + { "grn", "<cmd>Lspsaga rename<CR>", desc = "Lspsaga rename" }, { "[g", "<cmd>Lspsaga diagnostic_jump_next<CR>", desc = "Lspsaga jump to next diagnostic" }, { "]g", "<cmd>Lspsaga diagnostic_jump_prev<CR>", desc = "Lspsaga jump to previous diagnostic" }, } diff --git a/neovim/.config/nvim/lua/plugins/nvim_dap.lua b/neovim/.config/nvim/lua/plugins/nvim_dap.lua index f94fd0f..e1daedb 100644 --- a/neovim/.config/nvim/lua/plugins/nvim_dap.lua +++ b/neovim/.config/nvim/lua/plugins/nvim_dap.lua @@ -5,12 +5,6 @@ return { 'mfussenegger/nvim-dap-python', 'rcarriga/nvim-dap-ui', 'nvim-neotest/nvim-nio', - { - 'nvim-neotest/neotest', - dependencies = { - 'nvim-neotest/neotest-python', - } - }, }, keys = { { "<leader>br", require('dap').toggle_breakpoint, "Toggle breakpoint" }, @@ -102,14 +96,6 @@ return { }) require("dapui").setup() - - require("neotest").setup({ - adapters = { - require("neotest-python")({ - dap = { django = true }, - }), - } - }) end, }, } diff --git a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua index ebea05a..bd3e911 100644 --- a/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua +++ b/neovim/.config/nvim/lua/plugins/nvim_lspconfig.lua @@ -25,21 +25,6 @@ return { vim.lsp.enable(lsp) end - vim.lsp.config('basedpyright', { - settings = { - basedpyright = { - disableOrganizeImports = true, - }, - python = { - analysis = { - ignore = { '*' }, - }, - }, - } - }) - - vim.lsp.enable('basedpyright') - vim.lsp.config('lua_ls', { on_init = function(client) local path = client.workspace_folders[1].name @@ -56,7 +41,7 @@ return { -- Make the server aware of Neovim runtime files workspace = { checkThirdParty = false, - library = { + library = { vim.env.VIMRUNTIME -- Depending on the usage, you might want to add additional paths here. -- "${3rd}/luv/library" @@ -116,7 +101,9 @@ return { vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' local opts = { buffer = ev.buf } - vim.keymap.set('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', { noremap = true }) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, { noremap = true }) + vim.keymap.set('n', 'gI', vim.lsp.buf.implementation, { noremap = true }) + vim.keymap.set('n', 'gA', vim.lsp.buf.references, { noremap = true }) vim.keymap.set('v', '<leader>f', vim.lsp.buf.format, { noremap = true, silent = true }) vim.keymap.set('n', '<leader>f', function() vim.lsp.buf.format { async = true } diff --git a/neovim/.config/nvim/lua/plugins/pytest.lua b/neovim/.config/nvim/lua/plugins/pytest.lua new file mode 100644 index 0000000..20e246e --- /dev/null +++ b/neovim/.config/nvim/lua/plugins/pytest.lua @@ -0,0 +1,29 @@ +return { + { + "richardhapb/pytest.nvim", + dependencies = { "nvim-treesitter/nvim-treesitter" }, + opts = {}, -- Define the options here + config = function(_, opts) + require('nvim-treesitter.configs').setup { + ensure_installed = { 'python', 'xml' }, + docker = { + enabled = function() + return vim.fn.getcwd():match("docker-compose.dev.yml$") + end, + enable_docker_compose = function() + return vim.fn.getcwd():match("docker-compose.dev.yml$") + end, + docker_compose_file = "docker-compose.dev.yml", + }, + django = { + enabled = function() + return vim.fn.getcwd():match("manage.py$") + end, + django_settings_module = "krotosstudio.settings", + }, + } + + require('pytest').setup(opts) + end + } +} diff --git a/neovim/.config/nvim/lua/plugins/telescope.lua b/neovim/.config/nvim/lua/plugins/telescope.lua index 08729ca..0f81d89 100644 --- a/neovim/.config/nvim/lua/plugins/telescope.lua +++ b/neovim/.config/nvim/lua/plugins/telescope.lua @@ -7,11 +7,15 @@ return { 'nvim-lua/plenary.nvim', }, { - "nvim-telescope/telescope-live-grep-args.nvim", + 'nvim-telescope/telescope-live-grep-args.nvim', -- This will not install any breaking changes. -- For major updates, this must be adjusted manually. version = "^1.0.0", }, + { + 'nvim-telescope/telescope-fzf-native.nvim', + build = 'make' + }, }, cmd = "Telescope", keys = { @@ -29,7 +33,7 @@ return { live_grep_args = { auto_quoting = true, -- enable/disable auto-quoting -- define mappings, e.g. - mappings = { -- extend mappings + mappings = { -- extend mappings i = { ["<C-k>"] = lga_actions.quote_prompt(), ["<C-i>"] = lga_actions.quote_prompt({ postfix = " --iglob " }), @@ -47,6 +51,7 @@ return { -- then load the extension telescope.load_extension("live_grep_args") + telescope.load_extension("fzf") end }, } diff --git a/neovim/.config/nvim/lua/plugins/venv_selector.lua b/neovim/.config/nvim/lua/plugins/venv_selector.lua index 0e4fb30..b3f03af 100644 --- a/neovim/.config/nvim/lua/plugins/venv_selector.lua +++ b/neovim/.config/nvim/lua/plugins/venv_selector.lua @@ -1,7 +1,6 @@ return { { 'linux-cultist/venv-selector.nvim', - branch = 'regexp', opts = {}, keys = { { ',v', '<cmd>VenvSelect<CR>', desc = 'VenvSelect' }, |
