diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-03-21 23:56:13 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-03-21 23:56:13 +0200 |
| commit | d3133788ed35563ace10f788d81d747f4d946438 (patch) | |
| tree | a1fd5bba3a7d9a6b0399cca63cf40f7151d4f5f1 /lua/plugins | |
| parent | a6dbd983a6dbf796c55af6dd506bfa49849f637b (diff) | |
| download | dotfiles-d3133788ed35563ace10f788d81d747f4d946438.tar.gz dotfiles-d3133788ed35563ace10f788d81d747f4d946438.zip | |
Include rust-tools
Diffstat (limited to 'lua/plugins')
| -rw-r--r-- | lua/plugins/lsp.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 855818f..1818640 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -296,6 +296,39 @@ require("lspconfig").rust_analyzer.setup{ } end +local opts = { + tools = { + runnables = { + use_telescope = true, + }, + inlay_hints = { + auto = true, + show_parameter_hints = false, + parameter_hints_prefix = "", + other_hints_prefix = "", + }, + }, + + -- all the opts to send to nvim-lspconfig + -- these override the defaults set by rust-tools.nvim + -- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer + server = { + -- on_attach is a callback called when the language server attachs to the buffer + on_attach = on_attach, + settings = { + -- to enable rust-analyzer settings visit: + -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc + ["rust-analyzer"] = { + -- enable clippy on save + checkOnSave = { + command = "clippy", + }, + }, + }, + }, +} +require('rust-tools').setup(opts) + vim.diagnostic.config({ underline = false, signs = true, |
