diff options
Diffstat (limited to '.config/nvim/lua')
-rw-r--r-- | .config/nvim/lua/user/coderunner.lua | 2 | ||||
-rw-r--r-- | .config/nvim/lua/user/debugger.lua | 36 | ||||
-rw-r--r-- | .config/nvim/lua/user/lsp/python.lua | 9 | ||||
-rw-r--r-- | .config/nvim/lua/user/plugins.lua | 18 |
4 files changed, 63 insertions, 2 deletions
diff --git a/.config/nvim/lua/user/coderunner.lua b/.config/nvim/lua/user/coderunner.lua index 8dea6b4..77330ab 100644 --- a/.config/nvim/lua/user/coderunner.lua +++ b/.config/nvim/lua/user/coderunner.lua @@ -16,5 +16,7 @@ require('code_runner').setup({ 'cd ..' vim.cmd(string.format("TermExec cmd='%s'", script)) end, + python = 'python3 $file', + tex = 'mkdir -p build && pdflatex -output-directory=build -output-format=PDF $file' }, }) diff --git a/.config/nvim/lua/user/debugger.lua b/.config/nvim/lua/user/debugger.lua new file mode 100644 index 0000000..98a2bb2 --- /dev/null +++ b/.config/nvim/lua/user/debugger.lua @@ -0,0 +1,36 @@ +local dap = require('dap') + +-- try getting arguments +-- function() +-- local string = vim.ui.input("arguments to program:") +-- local t = {} +-- for str in string.gmatch(string, "([^ ]+)") do +-- table.insert(str) +-- end +-- return t +-- end, + + +lldb = { + name = "LLDB", + type = "lldb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + args = {}, + runInTerminal = false +} + +dap.adapters.lldb = { + type = "executable", + command = "/usr/bin/lldb-vscode", + name = "lldb" +} + +dap.configurations = { + cpp = { lldb }, + rust = { lldb }, +} diff --git a/.config/nvim/lua/user/lsp/python.lua b/.config/nvim/lua/user/lsp/python.lua index 5cd4a2e..2b073be 100644 --- a/.config/nvim/lua/user/lsp/python.lua +++ b/.config/nvim/lua/user/lsp/python.lua @@ -1 +1,10 @@ lsp = require 'lspconfig' + +lsp.pylsp.setup { + cmd = {"pylsp"}, + filetypes = {"py", "python"}, + root_dir = lsp.util.root_pattern("main.py", "configure", "Makefile", ".git"), + init_options = { + + }, +} diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 7b7e31d..06b52d1 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -4,7 +4,7 @@ plugins = { { "folke/lazy.nvim" }, -- plugin manager - { "nvim-lua/popup.nvim" }, -- some functions for other plugins + { "nvim-lua/popup.nvim" }, -- some functions for other plugin { "nvim-lua/plenary.nvim" }, -- some functions for other plugins { "folke/which-key.nvim" }, -- pretty self-descriptive name @@ -13,6 +13,12 @@ plugins = { { "folke/tokyonight.nvim" }, -- colorschemes + { + "smoka7/multicursors.nvim", + event = "VeryLazy", + dependencies = { 'smoka7/hydra.nvim' }, + cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' }, + }, { "tpope/vim-commentary" }, -- gc & gcc for commenting { "preservim/nerdtree" }, -- file explorer { @@ -100,12 +106,18 @@ plugins = { end, }, { - 'akinsho/bufferline.nvim', -- tab & buffer line + "akinsho/bufferline.nvim", -- tab & buffer line version = "*", -- dependencies = 'nvim-tree/nvim-web-devicons' -- for more details on how to configure this plugin in details please see `:h bufferline-configuration` }, --{ "lvimuser/lsp-inlayhints.nvim" } -- saved for the better times + + -- DEBUGGER CONFIGURATION + { + "mfussenegger/nvim-dap", -- the DAP itself + event = { "InsertEnter" }, + }, } @@ -140,3 +152,5 @@ require('blame').setup{ date_format = "%H:%M:%S %Y-%m-%d", merge_consecutive = true, } + +require'multicursors'.setup {} |