augh
This commit is contained in:
parent
99c942cc3b
commit
618a1e6841
8 changed files with 87 additions and 141 deletions
|
@ -9,7 +9,7 @@ Utils.nmap("]d", "<cmd>lua vim.diagnostic.goto_next()<CR>")
|
|||
Utils.nmap("<space>q", "<cmd>lua vim.diagnostic.setloclist()<CR>")
|
||||
|
||||
-- Set the following keybinds only after LSP attachment
|
||||
local on_attach = function(_, bufnr)
|
||||
local on_attach = function(client, bufnr)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
|
@ -28,10 +28,12 @@ local on_attach = function(_, bufnr)
|
|||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
|
||||
require("aerial").on_attach(client, bufnr)
|
||||
end
|
||||
|
||||
-- Initialize servers that don't need any extra config
|
||||
local simple_servers = {"rust_analyzer"}
|
||||
local simple_servers = {}
|
||||
for _, lsp in pairs(simple_servers) do
|
||||
require("lspconfig")[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
|
@ -47,6 +49,7 @@ table.insert(runtime_path, "lua/?.lua")
|
|||
table.insert(runtime_path, "lua/?/init.lua")
|
||||
|
||||
require("lspconfig").sumneko_lua.setup {
|
||||
on_attach = on_attach,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue