feat: up flake, configure dap for rust and change some neovim defaults

This commit is contained in:
Alexandre Cavalheiro 2024-02-16 20:40:28 -03:00
parent 9429111cee
commit 33cd62170b
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
7 changed files with 39 additions and 47 deletions

View file

@ -41,11 +41,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1707683400, "lastModified": 1708031129,
"narHash": "sha256-Zc+J3UO1Xpx+NL8UB6woPHyttEy9cXXtm+0uWwzuYDc=", "narHash": "sha256-EH20hJfNnc1/ODdDVat9B7aKm0B95L3YtkIRwKLvQG8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "21b078306a2ab68748abf72650db313d646cf2ca", "rev": "3d6791b3897b526c82920a2ab5f61d71985b3cf8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -65,11 +65,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1707847639, "lastModified": 1708018354,
"narHash": "sha256-mBmt1lFImpIK8VwHkJIenzVS95wD67dsfH1oRk2RiEg=", "narHash": "sha256-MlbqBzAjiz4Va2M/AvLN96Wq+jsCbEedhfMs5wW1yFM=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "2a3429d4cfdc01794b9d6fc1b49be1da019b5606", "rev": "fbf5ba87ce57752653f3bebf6e2be090c702836e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -163,11 +163,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1707689078, "lastModified": 1707956935,
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=", "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8", "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -300,11 +300,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1707813055, "lastModified": 1708099814,
"narHash": "sha256-tI6xFUBWq89HqSj0b8TfpXtH5bgM0apOa21vQbn991s=", "narHash": "sha256-a9OC33NEcACvKU3CwO8ao2ubibKUiq6JxnKvwbyOX8k=",
"owner": "sxyazi", "owner": "sxyazi",
"repo": "yazi", "repo": "yazi",
"rev": "b027487d12213b3653f33265b291dd41c707d1ab", "rev": "53525b511efe165b0a5227263e99e81697213033",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -22,7 +22,8 @@
/home/wizardlink/.cargo/bin \ /home/wizardlink/.cargo/bin \
/home/wizardlink/.local/bin \ /home/wizardlink/.local/bin \
/lib/flatpak/exports/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 zoxide init --cmd cd fish | source
''; '';

View file

@ -0,0 +1,10 @@
return {
codelldb = {
type = "server",
port = "${port}",
executable = {
command = "codelldb",
args = { "--port", "${port}" },
},
},
}

View 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,
},
},
}

View file

@ -84,12 +84,6 @@ return {
}, },
}, },
options = {
opt = {
relativenumber = false,
},
},
-- This function is run last and is a good place to configuring -- This function is run last and is a good place to configuring
-- augroups/autocommands and custom filetypes also this just pure lua so -- 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 -- anything that doesn't fit in the normal config locations above can go here

View file

@ -7,6 +7,9 @@ return {
spell = false, -- sets vim.opt.spell spell = false, -- sets vim.opt.spell
signcolumn = "auto", -- sets vim.opt.signcolumn to auto signcolumn = "auto", -- sets vim.opt.signcolumn to auto
wrap = false, -- sets vim.opt.wrap 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 = { g = {
mapleader = " ", -- sets vim.g.mapleader mapleader = " ", -- sets vim.g.mapleader

View file

@ -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,
}