feat: up flake, configure dap for rust and change some neovim defaults
This commit is contained in:
parent
9429111cee
commit
33cd62170b
7 changed files with 39 additions and 47 deletions
|
@ -22,7 +22,8 @@
|
|||
/home/wizardlink/.cargo/bin \
|
||||
/home/wizardlink/.local/bin \
|
||||
/lib/flatpak/exports/bin \
|
||||
/home/wizardlink/.local/share/scripts/burrito
|
||||
/home/wizardlink/.local/share/scripts/burrito \
|
||||
${pkgs.vscode-extensions.vadimcn.vscode-lldb.adapter}/bin
|
||||
|
||||
zoxide init --cmd cd fish | source
|
||||
'';
|
||||
|
|
10
programs/neovim/user/dap/adapters.lua
Normal file
10
programs/neovim/user/dap/adapters.lua
Normal file
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
codelldb = {
|
||||
type = "server",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "codelldb",
|
||||
args = { "--port", "${port}" },
|
||||
},
|
||||
},
|
||||
}
|
12
programs/neovim/user/dap/configurations.lua
Normal file
12
programs/neovim/user/dap/configurations.lua
Normal file
|
@ -0,0 +1,12 @@
|
|||
return {
|
||||
rust = {
|
||||
{
|
||||
name = "Launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function() return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end,
|
||||
cwd = "${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
},
|
||||
},
|
||||
}
|
|
@ -84,12 +84,6 @@ return {
|
|||
},
|
||||
},
|
||||
|
||||
options = {
|
||||
opt = {
|
||||
relativenumber = false,
|
||||
},
|
||||
},
|
||||
|
||||
-- This function is run last and is a good place to configuring
|
||||
-- augroups/autocommands and custom filetypes also this just pure lua so
|
||||
-- anything that doesn't fit in the normal config locations above can go here
|
||||
|
|
|
@ -7,6 +7,9 @@ return {
|
|||
spell = false, -- sets vim.opt.spell
|
||||
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
|
||||
wrap = false, -- sets vim.opt.wrap
|
||||
autochdir = true, -- automatically change the current directory
|
||||
autowrite = true, -- write file on modification
|
||||
grepprg = "rg --vimgrep", -- use ripgrep on grep actions
|
||||
},
|
||||
g = {
|
||||
mapleader = " ", -- sets vim.g.mapleader
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
return {
|
||||
"mfussenegger/nvim-dap",
|
||||
opts = function(_, config)
|
||||
local dap = require("dap")
|
||||
|
||||
dap.adapters.codelldb = {
|
||||
type = "server",
|
||||
port = "${port}",
|
||||
executable = {
|
||||
command = "codelldb",
|
||||
args = { "--port", "${port}" },
|
||||
}
|
||||
}
|
||||
|
||||
dap.configurations.rust = {
|
||||
{
|
||||
name = "Launch file",
|
||||
type = "codelldb",
|
||||
request = "launch",
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = '${workspaceFolder}',
|
||||
stopOnEntry = false,
|
||||
}
|
||||
}
|
||||
end,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue