This commit is contained in:
sankalp committed 2024-01-18 14:36:22 +05:45
1 parent 19d9347db9
commit 3ac528c554
72 files changed
+1734 -3140

No files matched your search

@@ -4,7 +4,7 @@ return {
"williamboman/mason.nvim",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
vim.list_extend(opts.ensure_installed, { "golangcil-lint" })
vim.list_extend(opts.ensure_installed, { "golangci-lint" })
end,
},
{
@@ -15,7 +15,6 @@ return {
"nvim-treesitter/nvim-treesitter",
},
opts = {},
event = { "LazyFile" },
ft = { "go", "gomod" },
build = function()
require("go.install").update_all_sync()
@@ -4,6 +4,18 @@ return {
"simrat39/rust-tools.nvim",
enabled = false,
},
-- TODO: Look at crates lsp
-- {
-- "Saecki/crates.nvim",
-- opts = {
-- lsp = {
-- enabled = true,
-- on_attach = function(client, bufnr) end,
-- actions = true,
-- completion = true,
-- },
-- },
-- },
{
"mrcjkb/rustaceanvim",
version = "^3", -- Recommended
@@ -1,3 +1,15 @@
local source_action = function(name)
return function()
vim.lsp.buf.code_action({
apply = true,
context = {
only = { string.format("source.%s.ts", name) },
diagnostics = {},
},
})
end
end
local inlayHints = {
includeInlayParameterNameHints = "all",
includeInlayParameterNameHintsWhenArgumentMatchesName = true,
@@ -47,6 +59,23 @@ return {
inlayHints = inlayHints,
},
},
keys = {
{
"<leader>co",
source_action("organizeImports"),
desc = "Organize Imports",
},
{
"<leader>cM",
source_action("addMissingImports"),
desc = "Add Missing Imports",
},
{
"<leader>cR",
source_action("removeUnused"),
desc = "Remove Unused Imports",
},
},
},
denols = {
root_dir = require("lspconfig").util.root_pattern("deno.json", "deno.jsonc", "deno.lock"),