diff options
author | Yigit Sever | 2022-12-07 12:06:58 +0300 |
---|---|---|
committer | Yigit Sever | 2022-12-07 12:06:58 +0300 |
commit | dd8de0ecd58263649290cd11e74dbbb7950a4e44 (patch) | |
tree | 7a7b678db879c2e713fa225e4fbf4e1af91d5622 /.config/nvim/lua/plugin_settings.lua | |
parent | e5e2af6072dfdf3f79d73edecc31b6efb3e4e395 (diff) | |
download | dotfiles-dd8de0ecd58263649290cd11e74dbbb7950a4e44.tar.gz dotfiles-dd8de0ecd58263649290cd11e74dbbb7950a4e44.tar.bz2 dotfiles-dd8de0ecd58263649290cd11e74dbbb7950a4e44.zip |
feat(nvim): use rust-tools and fidget
new plugins make us go microsoft code
Diffstat (limited to '.config/nvim/lua/plugin_settings.lua')
-rw-r--r-- | .config/nvim/lua/plugin_settings.lua | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/.config/nvim/lua/plugin_settings.lua b/.config/nvim/lua/plugin_settings.lua index fbd54ad..7ca473f 100644 --- a/.config/nvim/lua/plugin_settings.lua +++ b/.config/nvim/lua/plugin_settings.lua | |||
@@ -363,7 +363,7 @@ end | |||
363 | -- bring in cmp_nvim_lsp | 363 | -- bring in cmp_nvim_lsp |
364 | local capabilities = require('cmp_nvim_lsp').default_capabilities() | 364 | local capabilities = require('cmp_nvim_lsp').default_capabilities() |
365 | 365 | ||
366 | local servers = { 'rust_analyzer', 'jedi_language_server', 'texlab', 'clangd', 'ltex' } | 366 | local servers = { 'jedi_language_server', 'texlab', 'clangd', 'ltex' } |
367 | for _, lsp in ipairs(servers) do | 367 | for _, lsp in ipairs(servers) do |
368 | nvim_lsp[lsp].setup { | 368 | nvim_lsp[lsp].setup { |
369 | on_attach = on_attach, | 369 | on_attach = on_attach, |
@@ -377,6 +377,44 @@ nvim_lsp['efm'].setup{ | |||
377 | capabilities = capabilities | 377 | capabilities = capabilities |
378 | } | 378 | } |
379 | 379 | ||
380 | -- Configure LSP through rust-tools.nvim plugin. | ||
381 | -- rust-tools will configure and enable certain LSP features for us. | ||
382 | -- See https://github.com/simrat39/rust-tools.nvim#configuration | ||
383 | local rust_opts = { | ||
384 | tools = { | ||
385 | runnables = { | ||
386 | use_telescope = true, | ||
387 | }, | ||
388 | inlay_hints = { | ||
389 | auto = true, | ||
390 | show_parameter_hints = false, | ||
391 | parameter_hints_prefix = "", | ||
392 | other_hints_prefix = "", | ||
393 | }, | ||
394 | }, | ||
395 | |||
396 | -- all the opts to send to nvim-lspconfig | ||
397 | -- these override the defaults set by rust-tools.nvim | ||
398 | -- see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#rust_analyzer | ||
399 | server = { | ||
400 | -- on_attach is a callback called when the language server attachs to the buffer | ||
401 | on_attach = on_attach, | ||
402 | settings = { | ||
403 | -- to enable rust-analyzer settings visit: | ||
404 | -- https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/generated_config.adoc | ||
405 | ["rust-analyzer"] = { | ||
406 | -- enable clippy on save | ||
407 | checkOnSave = { | ||
408 | command = "clippy", | ||
409 | }, | ||
410 | }, | ||
411 | }, | ||
412 | }, | ||
413 | } | ||
414 | |||
415 | require('rust-tools').setup(rust_opts) | ||
416 | |||
417 | |||
380 | -- }}} nvim-lsp -- | 418 | -- }}} nvim-lsp -- |
381 | 419 | ||
382 | -- vista {{{ -- | 420 | -- vista {{{ -- |
@@ -587,3 +625,14 @@ require('leap').setup { | |||
587 | } | 625 | } |
588 | 626 | ||
589 | -- }}} leap.nvim -- | 627 | -- }}} leap.nvim -- |
628 | |||
629 | -- fidget.nvim {{{ -- | ||
630 | require("fidget").setup{ | ||
631 | -- https://github.com/j-hui/fidget.nvim/blob/main/doc/fidget.md | ||
632 | text = { | ||
633 | spinner = "triangle" | ||
634 | } | ||
635 | |||
636 | } | ||
637 | -- }}} fidget.nvim -- | ||
638 | |||