You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to turn off checkThirdParty to get sumneko lua lsp to stop asking me to configure LOVE on each session start. That seems to cause it to fail to load builtins. I found this issue with a solution LuaLS/lua-language-server#1788:
That tells sumneko where it can generate "meta files" that describe modules -- including the built-ins. When it fails to generate these meta files it may fail to recognize some types.
Should vim-lsp-settings include a default meta path? It could be where the server is installed, but I'm not sure if you'd want it to be a default component of args (since changing args without removing it is unintuitive)?
The default for --metapath is ./meta so maybe I have something else wrong and somehow that relative path is now rooted somewhere bad?
This is what I'm doing that made builtins (like math.sin) show as unrecognized:
" In ~/.vim/ftplugin/lua.vim
let servername = 'sumneko-lua-language-server'
if lsp#get_server_status(servername) !=# 'running'
finish
endif
" Prevent love detection nag: lua-language-server#679
" and preload nag: lua-language-server#1594
let cfg = { 'Lua' : {} }
let cfg.Lua.workspace = {
\ 'checkThirdParty' : v:false,
\ 'maxPreload' : 10000,
\ }
call lsp#update_workspace_config(servername, cfg)
The text was updated successfully, but these errors were encountered:
I needed to turn off checkThirdParty to get sumneko lua lsp to stop asking me to configure LOVE on each session start. That seems to cause it to fail to load builtins. I found this issue with a solution LuaLS/lua-language-server#1788:
That tells sumneko where it can generate "meta files" that describe modules -- including the built-ins. When it fails to generate these meta files it may fail to recognize some types.
Should vim-lsp-settings include a default meta path? It could be where the server is installed, but I'm not sure if you'd want it to be a default component of
args
(since changing args without removing it is unintuitive)?The default for --metapath is
./meta
so maybe I have something else wrong and somehow that relative path is now rooted somewhere bad?This is what I'm doing that made builtins (like
math.sin
) show as unrecognized:The text was updated successfully, but these errors were encountered: