This commit is contained in:
Markus Dieckmann 2022-09-02 16:10:28 +02:00
commit e46a22ddd6
4 changed files with 63 additions and 60 deletions

View File

@ -1,4 +1,3 @@
local set = vim.opt
set.modelines = 0
set.hidden = true

View File

@ -29,7 +29,7 @@ local on_attach = function(client, bufnr)
vim.keymap.set('n', '<leader>rn', vim.lsp.buf.rename, bufopts)
vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, bufopts)
vim.keymap.set('n', '<leader>gr', vim.lsp.buf.references, bufopts)
vim.keymap.set('n', '<leader>f',function() vim.lsp.buf.format { async = true } end, bufopts)
vim.keymap.set('n', '<leader>f', vim.lsp.buf.formatting, bufopts)
end
local lsp_flags = {
@ -44,7 +44,10 @@ require('mason-lspconfig').setup_handlers{
}
end,
['rust_analyzer'] = function()
require('rust-tools').setup {}
require('rust-tools').setup {
on_attach = on_attach,
flags = lsp_flags,
}
end,
['sumneko_lua'] = function()
require('lspconfig')["sumneko_lua"].setup {

View File

@ -1,7 +1,8 @@
require("null-ls").setup({
sources = {
require("null-ls").builtins.formatting.stylua,
--require("null-ls").builtins.formatting.stylua,
-- require("null-ls").builtins.diagnostics.eslint,
-- require("null-ls").builtins.completion.spell,
},