feat: golang import fixing
This commit is contained in:
@@ -35,6 +35,7 @@ M.mason = {
|
|||||||
"debugpy",
|
"debugpy",
|
||||||
"rust-analyzer",
|
"rust-analyzer",
|
||||||
"codelldb",
|
"codelldb",
|
||||||
|
"prettier",
|
||||||
"tailwindcss-language-server",
|
"tailwindcss-language-server",
|
||||||
"golangci-lint-langserver",
|
"golangci-lint-langserver",
|
||||||
"typescript-language-server",
|
"typescript-language-server",
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
local options = {
|
local options = {
|
||||||
formatters_by_ft = {
|
formatters_by_ft = {
|
||||||
lua = { "stylua" },
|
lua = { "stylua" },
|
||||||
css = { "prettier" },
|
css = { "prettier" },
|
||||||
html = { "prettier" },
|
html = { "prettier" },
|
||||||
go = { "gopls" },
|
go = { "gopls", "goimports" },
|
||||||
ts = { "prettier" },
|
ts = { "prettier" },
|
||||||
tsx = { "prettier" },
|
tsx = { "prettier" },
|
||||||
js = { "prettier" },
|
js = { "prettier" },
|
||||||
jsx = { "prettier" }
|
jsx = { "prettier" },
|
||||||
},
|
},
|
||||||
|
|
||||||
format_on_save = {
|
format_on_save = {
|
||||||
-- These options will be passed to conform.format()
|
-- These options will be passed to conform.format()
|
||||||
timeout_ms = 500,
|
timeout_ms = 500,
|
||||||
lsp_fallback = true,
|
lsp_fallback = true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
return options
|
return options
|
||||||
|
|||||||
@@ -39,3 +39,23 @@ end, { desc = "Show lines git blame" })
|
|||||||
map("n", "gi", function()
|
map("n", "gi", function()
|
||||||
require("telescope.builtin").lsp_implementations()
|
require("telescope.builtin").lsp_implementations()
|
||||||
end, { desc = "Go to LSP implementations via Telescope" })
|
end, { desc = "Go to LSP implementations via Telescope" })
|
||||||
|
|
||||||
|
map("n", "<leader>gvi", function()
|
||||||
|
vim.cmd("vsplit")
|
||||||
|
require("telescope.builtin").lsp_implementations()
|
||||||
|
end, { desc = "Go to LSP implementations in a vsplit" })
|
||||||
|
|
||||||
|
map("n", "<leader>ghi", function()
|
||||||
|
vim.cmd("split")
|
||||||
|
require("telescope.builtin").lsp_implementations()
|
||||||
|
end, { desc = "Go to LSP implementations in a split" })
|
||||||
|
|
||||||
|
map("n", "<leader>gvd", function()
|
||||||
|
vim.cmd("vsplit")
|
||||||
|
require("telescope.builtin").lsp_definitions()
|
||||||
|
end, { desc = "Go to LSP definitions in a new vsplit" })
|
||||||
|
|
||||||
|
map("n", "<leader>ghd", function()
|
||||||
|
vim.cmd("split")
|
||||||
|
require("telescope.builtin").lsp_definitions()
|
||||||
|
end, { desc = "Go to LSP definition in a new split" })
|
||||||
|
|||||||
Reference in New Issue
Block a user