mirror of
https://github.com/iofq/nvim.nix.git
synced 2026-01-23 08:55:16 -06:00
lsp changes, mini.ai
This commit is contained in:
parent
e260bac77b
commit
8b0a7ef1a6
4 changed files with 37 additions and 38 deletions
|
|
@ -1,6 +1,9 @@
|
|||
-- Setup language servers.
|
||||
local lspconfig = require('lspconfig')
|
||||
lspconfig.gopls.setup {}
|
||||
lspconfig.gopls.setup { on_attach = function(_, bufnr)
|
||||
vim.api.nvim_command("au BufWritePost <buffer> lua vim.lsp.buf.format { async = true }")
|
||||
end
|
||||
}
|
||||
|
||||
-- Global mappings.
|
||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||
|
|
@ -20,7 +23,6 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc'
|
||||
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue