fix: Code actions related stuff

This commit is contained in:
Sayantan Santra 2025-04-28 12:35:42 -05:00
parent d77ba87c3e
commit d92f57336f
Signed by: SinTan1729
GPG key ID: 0538DD402EA50898
3 changed files with 14 additions and 2 deletions

View file

@ -90,7 +90,19 @@ require("lazy").setup({
event = "LspAttach",
config = true,
},
{
"folke/snacks.nvim",
priority = 1000,
lazy = false,
---@type snacks.Config
opts = {
picker = { enabled = true },
bigfile = { enabled = true },
dashboard = { enabled = true },
},
},
"dvrlabs/takeout.nvim",
"aznhe21/actions-preview.nvim",
},
lockfile = vim.fn.stdpath("config") .. "/config/lazy-lock.json",
install = { missing = true, colorscheme = { "habamax" } },

View file

@ -9,7 +9,7 @@ local map = vim.keymap.set
vim.api.nvim_create_autocmd("LspAttach", {
callback = function()
map('n', '<localleader>k', vim.lsp.buf.hover, { remap = false })
map('n', '<localleader>a', vim.lsp.buf.code_action, { remap = false })
map({ 'v', 'n' }, '<localleader>a', require("actions-preview").code_actions, { remap = false })
map('n', '<localleader>d', vim.diagnostic.open_float, { remap = false })
map('n', '<localleader>n', vim.diagnostic.goto_next, { remap = false })
map('n', '<localleader>N', vim.diagnostic.goto_prev, { remap = false })

View file

@ -3,7 +3,7 @@ local configs = require("nvim-treesitter.configs")
configs.setup({
ensure_installed = { "rust", "lua", "vim", "vimdoc", "ocaml",
"yaml", "dockerfile", "bash", "html", "javascript", "css", "go",
"json", "python", "fish", "haskell" },
"json", "python", "fish", "haskell", "diff" },
sync_install = false,
disable = { "latex" },
highlight = {