-
-
Save Julian/5ddb85a86f4295491546832b25fc2011 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim.opt.completeopt = { 'menuone', 'noselect' } | |
require'compe'.setup{ | |
autocomplete = false, | |
source = { | |
nvim_lsp = { priority = 99 }, | |
nvim_lua = { priority = 99 }, | |
path = { priority = 99 }, | |
} | |
} | |
-- You may want to reference the nvim-lspconfig documentation, found at: | |
-- https://github.com/neovim/nvim-lspconfig#keybindings-and-completion | |
-- The below is just a simple initial set of mappings. | |
local function on_attach(_, bufnr) | |
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end | |
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end | |
buf_set_keymap('n', 'gd', '<Cmd>lua vim.lsp.buf.definition()<CR>', {noremap = true}) | |
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', {noremap = true}) | |
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc') | |
end | |
require('lean').setup{ | |
abbreviations = { builtin = true }, | |
lsp = { on_attach = on_attach }, | |
lsp3 = { on_attach = on_attach }, | |
mappings = true, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment