feat(nvim): disable rust extra, manually configure lsp

This commit is contained in:
Michael Thomas 2024-06-03 15:24:11 -04:00
parent f09894d0dc
commit febc9ee925
3 changed files with 30 additions and 10 deletions

View File

@ -1,6 +1,6 @@
{
"extras": [
"lazyvim.plugins.extras.lang.rust"
],
"news": {
"NEWS.md": "3314"

View File

@ -11,7 +11,8 @@ require("lazy").setup({
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins", opts = { colorscheme = "gruvbox" } },
-- import any extras modules here
-- { import = "lazyvim.plugins.extras.lang.typescript" },
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- { import = "lazyvim.plugins.extras.lang.rust" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.ui.mini-animate" },
-- import/override with your plugins

View File

@ -1,17 +1,30 @@
return {
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
---@diagnostic disable-next-line: missing-fields
servers = {
---@diagnostic disable-next-line: missing-fields
tsserver = {},
---@diagnostic disable-next-line: missing-fields
eslint = {},
nil_ls = {},
rust_analyzer = {},
taplo = {
keys = {
{
"K",
function()
if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then
require("crates").show_popup()
else
vim.lsp.buf.hover()
end
end,
desc = "Show Crate Documentation",
},
},
},
},
-- setup = {
-- rust_analyzer = function()
-- return true
-- end,
-- },
},
},
{
@ -64,4 +77,10 @@ return {
{
"rush-rs/tree-sitter-asm",
},
{
"imsnif/kdl.vim",
},
{
"andreshazard/vim-freemarker",
},
}