191 current 2025-10-09 22:11:00 25.05.20251006.20c4598 6.12.50 *
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# flake for blakes nixos config
|
||||
# define new devices in outputs
|
||||
# generation: 190 current 2025-10-09 22:00:15 25.05.20251006.20c4598 6.12.50 *
|
||||
# generation: 191 current 2025-10-09 22:11:00 25.05.20251006.20c4598 6.12.50 *
|
||||
{
|
||||
description = "blakes nix config";
|
||||
inputs = {
|
||||
|
||||
@@ -106,8 +106,11 @@ in
|
||||
curl
|
||||
fzf
|
||||
fd
|
||||
nil
|
||||
nixd
|
||||
nixfmt
|
||||
rust
|
||||
lua-language-server
|
||||
pyright
|
||||
tree
|
||||
vim
|
||||
lf
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "bd5a7d6db125d4654b50eeae9f5217f24bb22fd3" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "6bdb14f230de0904229ec367b410fb817e59b072" },
|
||||
"mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "cc2f5f2fa28d240574808e78847978ed6ef20d2a" },
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
-- LSP Keymaps (applies when any LSP attaches)
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspKeymaps", { clear = true }),
|
||||
callback = function(event)
|
||||
local opts = { buffer = event.buf, silent = true, noremap = true }
|
||||
|
||||
-- 🧭 Navigation
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts)
|
||||
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
|
||||
|
||||
-- 🧠 Info
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
|
||||
|
||||
-- 🛠️ Actions
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
|
||||
-- 🧹 Formatting
|
||||
vim.keymap.set("n", "<leader>f", function()
|
||||
vim.lsp.buf.format({ async = false })
|
||||
end, vim.tbl_extend("force", opts, { desc = "Format buffer with LSP" }))
|
||||
|
||||
-- 💡 Diagnostics
|
||||
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
||||
vim.keymap.set("n", "<leader>q", vim.diagnostic.setloclist, opts)
|
||||
|
||||
-- 🧩 Inlay hints (toggle)
|
||||
if vim.lsp.inlay_hint then
|
||||
vim.keymap.set("n", "<leader>h", function()
|
||||
local enabled = vim.lsp.inlay_hint.is_enabled(event.buf)
|
||||
vim.lsp.inlay_hint.enable(not enabled, { bufnr = event.buf })
|
||||
end, vim.tbl_extend("force", opts, { desc = "Toggle inlay hints" }))
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user