diff options
author | Matthew Lemon <y@yulqen.org> | 2023-08-12 15:15:53 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2023-08-12 15:15:53 +0100 |
commit | 6f9408206d53d9b0b2fd43e0f7e91157773f0b9d (patch) | |
tree | 288fdfa3ac23e2712bdd097b9669eed22432a369 /nvim-primeagen/after | |
parent | 51dad503f84263739a4441c3c5c8ad9d4102a683 (diff) |
Better config for neovim
Diffstat (limited to 'nvim-primeagen/after')
-rw-r--r-- | nvim-primeagen/after/plugin/ale.lua | 4 | ||||
-rw-r--r-- | nvim-primeagen/after/plugin/dap.lua | 11 | ||||
-rw-r--r-- | nvim-primeagen/after/plugin/neotest-python.lua | 8 |
3 files changed, 19 insertions, 4 deletions
diff --git a/nvim-primeagen/after/plugin/ale.lua b/nvim-primeagen/after/plugin/ale.lua index 5575f9f..b3b5c0d 100644 --- a/nvim-primeagen/after/plugin/ale.lua +++ b/nvim-primeagen/after/plugin/ale.lua @@ -1,6 +1,6 @@ -- Set the configuration options for the plugin local linters = { - python = {'ruff', 'flake8'}, + python = {'ruff', 'flake8', 'pyright'}, ocaml = {'merlin'}, cpp = {'clang'}, yaml = {'yamllint'}, @@ -9,7 +9,7 @@ local linters = { } local fixers = { - python = {'ruff', 'isort', 'yapf', 'black', 'pyright'}, + python = {'ruff', 'isort', 'yapf', 'black', 'autoimport'}, go = {'gofmt'}, rust = {'rustfmt'}, } diff --git a/nvim-primeagen/after/plugin/dap.lua b/nvim-primeagen/after/plugin/dap.lua index 495445f..fcfb94a 100644 --- a/nvim-primeagen/after/plugin/dap.lua +++ b/nvim-primeagen/after/plugin/dap.lua @@ -4,6 +4,17 @@ dap.adapters.python = { command = '.venv/bin/python'; args = { '-m', 'debugpy.adapter' }; } +dap.configurations.python = { + { + type = 'python'; + request = 'launch'; + name = "Launch file"; + program = "${file}"; + pythonPath = function() + return '.venv/bin/python' + end; + }, +} vim.keymap.set('n', '<F5>', function() require('dap').continue() end) vim.keymap.set('n', '<F10>', function() require('dap').step_over() end) diff --git a/nvim-primeagen/after/plugin/neotest-python.lua b/nvim-primeagen/after/plugin/neotest-python.lua index 6637042..6505eec 100644 --- a/nvim-primeagen/after/plugin/neotest-python.lua +++ b/nvim-primeagen/after/plugin/neotest-python.lua @@ -1,7 +1,7 @@ require("neotest").setup({ quickfix = { - open = false, - enabled = false, + open = true, + enabled = true, }, status = { enabled = true, @@ -87,6 +87,10 @@ vim.keymap.set("n", "tf", function() require("neotest").run.run(vim.fn.expand("%")) end) +vim.keymap.set("n", "td", function() + require("neotest").run.run({strategy = "dap"}) +end) + vim.keymap.set("n", "tr", function() local neotest = require("neotest") neotest.run.run() |