Skip to content

Commit

Permalink
lsp(rust): update settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Jun 11, 2024
1 parent c6c751a commit 527855f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lua/nxvim/lsp/plugins/mason/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ mason_lspconfig.setup_handlers({
on_attach = on_attach,
}

-- Handled by rust-tools.
if server == "rust_analyzer" then goto continue end

-- Insert server settings from settings file if present.
-- The name of the settings file must match the name of the language server.
local server_settings_ok, server_settings = pcall(require, "nxvim.lsp.settings." .. server)
Expand All @@ -52,12 +55,11 @@ mason_lspconfig.setup_handlers({
if server == "gopls" then goto setup end
-- Use prettierd as formatter.
if server == "jsonls" then opts.init_options = { provideFormatter = false } end
-- Handled by rust-tools.
if server == "rust_analyzer" then goto continue end
if server == "zls" then vim.g.zig_fmt_autosave = 0 end

::setup::
lspconfig[server].setup(opts)

::continue::
end,
})
Expand Down
1 change: 0 additions & 1 deletion lua/nxvim/lsp/plugins/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ null_ls.setup({
},
extra_args = { "--use-tabs", "--printWidth: 100", "--semi", "--single-quote" },
}),
fmt.rustfmt,
fmt.stylua,
fmt.yapf,
},
Expand Down

0 comments on commit 527855f

Please sign in to comment.