rust-tools
This commit is contained in:
parent
a45cace9f2
commit
b765de7e3f
|
@ -6,6 +6,10 @@ if empty(glob('~/.config/nvim/autoload/plug.vim'))"
|
||||||
endif
|
endif
|
||||||
call plug#begin('~/.config/nvim/bundle')
|
call plug#begin('~/.config/nvim/bundle')
|
||||||
|
|
||||||
|
" evaluating
|
||||||
|
" https://github.com/simrat39/rust-tools.nvim
|
||||||
|
Plug 'simrat39/rust-tools.nvim'
|
||||||
|
|
||||||
" colorscheme (temporary)
|
" colorscheme (temporary)
|
||||||
Plug 'https://github.com/marko-cerovac/material.nvim', { 'branch': 'main' }
|
Plug 'https://github.com/marko-cerovac/material.nvim', { 'branch': 'main' }
|
||||||
let g:material_style = 'lighter'
|
let g:material_style = 'lighter'
|
||||||
|
|
|
@ -30,9 +30,10 @@ local servers = {
|
||||||
-- no formatting support
|
-- no formatting support
|
||||||
'vimls', -- vue
|
'vimls', -- vue
|
||||||
-- use vetur
|
-- use vetur
|
||||||
'yamlls', -- no formatting support
|
'yamlls' -- no formatting support
|
||||||
|
-- is now automatically started/configured by rust-tools
|
||||||
-- sudo pacman -Syu rust-analyzer
|
-- sudo pacman -Syu rust-analyzer
|
||||||
'rust_analyzer'
|
-- 'rust_analyzer'
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
|
@ -158,6 +159,25 @@ require'lspconfig'.taplo.setup {
|
||||||
cmd = {"taplo", "lsp", "stdio"}
|
cmd = {"taplo", "lsp", "stdio"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-- rust-tools
|
||||||
|
-- evaluating
|
||||||
|
require('rust-tools').setup({
|
||||||
|
server = {
|
||||||
|
on_attach = on_attach,
|
||||||
|
capabilities = capabilities,
|
||||||
|
flags = {debounce_text_changes = 150},
|
||||||
|
|
||||||
|
settings = {["rust-analyzer"] = {checkOnSave = {command = "clippy"}}}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
-- set inlay hints
|
||||||
|
require('rust-tools.inlay_hints').set_inlay_hints()
|
||||||
|
-- disable inlay hints
|
||||||
|
require('rust-tools.inlay_hints').disable_inlay_hints()
|
||||||
|
-- toggle inlay hints
|
||||||
|
require('rust-tools.inlay_hints').toggle_inlay_hints()
|
||||||
|
------
|
||||||
|
|
||||||
-- null-ls
|
-- null-ls
|
||||||
local null_ls = require("null-ls")
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
-- nvim-autopairs
|
-- nvim-autopairs
|
||||||
require('nvim-autopairs').setup{}
|
require('nvim-autopairs').setup {}
|
||||||
-- you need setup cmp first put this after cmp.setup()
|
-- you need setup cmp first put this after cmp.setup()
|
||||||
require("cmp").setup({
|
require("cmp").setup({
|
||||||
map_cr = false, -- map <CR> on insert mode
|
map_cr = false, -- map <CR> on insert mode
|
||||||
map_complete = false, -- it will auto insert `(` after select function or method item
|
map_complete = false, -- it will auto insert `(` after select function or method item
|
||||||
auto_select = true -- automatically select the first item
|
auto_select = true -- automatically select the first item
|
||||||
})
|
})
|
||||||
|
------
|
||||||
|
|
||||||
--nvim-ts-autotag
|
-- nvim-ts-autotag
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {autotag = {enable = true}}
|
||||||
autotag = {
|
------
|
||||||
enable = true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue