Comments (4)
completion
was not exposed. But since 81e3d1f you can overwrite it if you want.
This should work now.
local lsp = require('lsp-zero')
lsp.preset('recommended')
lsp.setup_nvim_cmp({
completion = { autocomplete = false }
})
lsp.setup()
from lsp-zero.nvim.
Thank you for your lightening fast response!
I've updated your plugin in my setup (Using plug, so I ran :PlugUpdate). I saw that lsp-zero was updated. I also went to the ~/.vim/plugged/lsp-zero
folder and checked the git history, and the 81e3d1f
commit was there, in addition to a couple more.
I have a series of lsp calls in my lua config: lsp.set_preferences(...), lsp.on_attach(...), lsp.setup_nvim_cmp(...)
. Here is the relevant config:
local lspz = require('lsp-zero')
lspz.set_preferences({
suggest_lsp_servers = true,
setup_servers_on_start = true,
set_lsp_keymaps = false, -- Toggled b/c the defaults are alright but not great for me.
configure_diagnostics = true,
cmp_capabilities = true,
manage_nvim_cmp = true,
call_servers = 'local',
sign_icons = {
error = '✘',
warn = '▲',
hint = '⚑',
info = ''
}
})
lspz.on_attach(function()
local noremap = {noremap = true}
local map = function(...) vim.api.nvim_buf_set_keymap(0, ...) end
map('n', '<leader>je', '<cmd>lua vim.lsp.buf.rename()<cr>', noremap)
map('n', '<leader>jk', '<cmd>lua vim.lsp.buf.hover()<cr>', noremap)
map('n', '<leader>jd', '<cmd>lua vim.lsp.buf.definition()<cr>', noremap)
map('n', '<leader>jD', '<cmd>lua vim.lsp.buf.declaration()<cr>', noremap)
map('n', '<leader>jt', '<cmd>lua vim.lsp.buf.type_definition()<cr>', noremap)
map('n', '<leader>ji', '<cmd>lua vim.lsp.buf.implementation()<cr>', noremap)
map('n', '<leader>jr', '<cmd>lua vim.lsp.buf.references()<cr>', noremap)
map('n', '<leader>js', '<cmd>lua vim.lsp.buf.signature_help()<cr>', noremap)
map('n', '<leader>ja', '<cmd>lua vim.lsp.buf.code_action()<cr>', noremap)
map('n', '<leader>jf', '<cmd>lua LspZeroFormat<cr>', noremap)
map('n', '<leader>jw', '<cmd>lua vim.diagnostic.open_float()<cr>', noremap)
map('n', '<C-l>', '<cmd>lua vim.diagnostic.goto_prev()<cr>', noremap)
map('n', '<C-h>', '<cmd>lua vim.diagnostic.goto_next()<cr>', noremap)
end)
lspz.setup_nvim_cmp({
completion = { autocomplete = false }
})
lspz.setup()
However I'm still seeing autocompletion. Am I doing anything obviously wrong?
from lsp-zero.nvim.
It works for me.
Could it be another plugin or old configuration code still around?
Side note: <leader>jf
is not going to work. LspZeroFormat
is a vim command not a lua function. You should bind it to <cmd>lua vim.lsp.buf.formatting()<cr>
.
from lsp-zero.nvim.
Ah oh nice, thank you for the heads up about jf
, you're right that totally will not work.
I'm not really sure, I'll keep looking into it and if I find an answer I'll come back and post. Thanks for your help!
UPDATE: User error all the way. In figuring out where I was going to house my rc/init scripts and just generally getting it all working, I forgot to make a sym link to a file and was editing one in the wrong directory. Works now like a charm.
from lsp-zero.nvim.
Related Issues (20)
- Bug: use_fallback = true causing single-repeat issues HOT 3
- autocomplete on tab HOT 1
- How to integrate conform.nvim with lsp-zero.nvim HOT 2
- Need help to load friendly-snippets HOT 1
- lsp_zero.cmp_format() hides important information for rust_analyzer HOT 2
- error installing gopls(same thing happend with hls) HOT 2
- error installing hls(haskell server) HOT 1
- Allow setting max width on vim.diagnostics
- Add docs or possible fix for Volar 2? HOT 4
- method textDocument/definition is not supported by any of the servers registered for the current buffer HOT 6
- Hi @VonHeikemen, came here after an year coz it was unmaintained, i grew up a lot in this time period, help me get back to `lsp-zero` HOT 3
- Undercurls to display errors HOT 2
- How do I turn off inlay hints? HOT 2
- Cannot get auto complete to work HOT 5
- How to configure efm? HOT 1
- Duplicate prefixes HOT 1
- lsp-zero conflict with noice shipped in LazyVim HOT 2
- Function signature helper HOT 1
- lsp server seem to be configured before .extend_lspconfig() HOT 4
- Question: Doc site HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-zero.nvim.