Neovim LSP Autocomplete #3451
Replies: 3 comments 2 replies
-
Hey there @joshmedeski; the best bet is to first, install the |
Beta Was this translation helpful? Give feedback.
-
Thanks, once I installed and loaded the EmmyLua Spoon, I created this {
"neodev": {
"library": {
"enabled": true,
"plugins": ["nvim-lspconfig"]
}
},
"lspconfig": {
"lua_ls": {
"Lua.workspace.library": [
"/Users/{username}/.hammerspoon/Spoons/EmmyLua.spoon/annotations"
]
}
}
} And it works! |
Beta Was this translation helpful? Give feedback.
-
Thank You for this thread! This still works in 2025. I always feel a little pity for my LSP when it does not know what is going on. Step-by-step instructions for noobs like meAssumes you have hammerspoon installed.
-- {your hammerspoon path}/init.lua
hs.loadSpoon("EmmyLua")
Setup for NeoVim 0.11 with native LSP -- nvim/lsp/lua_ls.lua
return {
on_init = function(client)
client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, {
workspace = {
library = {
vim.fn.expand("~/.hammerspoon/Spoons/EmmyLua.spoon/annotations"),
},
},
})
end,
} That's how I got it to work, anyway. Any optimizations welcome! Cheers! PS. As long as I don't install new Spoons, I don't need to load EmmyLua each time, right? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using Neovim to write my hammerspoon configuration.
I'd love to setup auto-complete, code completion, and documentation for the lua language server.
What would be the first steps to getting this done? Has anyone else made any attempts to work on this?
Beta Was this translation helpful? Give feedback.
All reactions