Comments (8)
Thanks! Everything seems to work for me now! Thanks again for the plugin; this will make my life substantially easier.
from neodev.nvim.
Are you on windows by any chance? Haven't tested it there...
What do you use for adding plugins? packer?
Can you post a print(vim.inspect(...))
of the result you get from luadev.setup
?
from neodev.nvim.
Sure:
- I'm on Linux
- Neovim version: NVIM v0.5.0-dev+1339-g5d9c56012 (with LuaJIT)
- I do use
packer
, yes.
Results of luadev.setup
:
{
cmd = { "lua-language-server" },
on_new_config = <function 1>,
settings = {
Lua = {
awakened = {
cat = true,
<metatable> = <1>{
__tostring = <function 2>
}
},
diagnostics = {
globals = { "vim" },
<metatable> = <table 1>
},
runtime = {
path = { "./?.lua", "/usr/share/luajit-2.0.5/?.lua", "/usr/local/share/lua/5.1/?.lua", "/usr/local/share/lua/5.1/?/init.lua", "/usr/share/lua/5.1/?.l
ua", "/usr/share/lua/5.1/?/init.lua", "lua/?.lua", "lua/?/init.lua" },
version = "LuaJIT",
<metatable> = <table 1>
},
telemetry = {
enable = false,
<metatable> = <table 1>
},
workspace = {
library = {},
maxPreload = 2000,
preloadFileSize = 150,
<metatable> = <table 1>
},
<metatable> = <table 1>
},
<metatable> = <table 1>
}
}
Later in my setup, I modify that table by adding an on_attach
and a capabilities
table.
My full setup is here:
- LSP stuff: https://github.com/wbthomason/dotfiles/blob/linux/neovim/.config/nvim/lua/config/lsp.lua
compe
: https://github.com/wbthomason/dotfiles/blob/linux/neovim/.config/nvim/lua/config/compe.lua
from neodev.nvim.
What does :lua print(vim.inspect(require("lua-dev.sumneko").library()))
give?
from neodev.nvim.
That gets me:
E5108: Error executing lua ...e/pack/packer/start/lua-dev.nvim/lua/lua-dev/sumneko.lua:9: table index is nil
from neodev.nvim.
Looking into that error, it seems that in lua-dev.sumneko.types
, the problem is:
f = "/home/wil/.local/share/nvim/site/pack/packer/start/lua-dev.nvim/lua/lua-dev/s
umneko.lua"
vim.loop.fs_realpath(f .. '/../../../types') = nil ENOTDIR: not a directory: /home/wil/.local/share/nvim/site/pack/packer/sta
rt/lua-dev.nvim/lua/lua-dev/sumneko.lua/../../../types ENOTDIR
from neodev.nvim.
Using vim.loop.fs_realpath(vim.fn.fnamemodify(f, ':h:h:h') .. '/types')
instead of the current ../../../types
approach seems to work? I'm not sure why only I have encountered this issue, but I'm happy to make a PR if you'd like to use this change.
from neodev.nvim.
Thank you for debugging this! I just pushed a change with your suggestion.
The code that was there before actually started with a filename to go up, which for some reason works on macos, but probably not on your distro.
So I did something like lua/foo.lua/../../..
Your approach is definitely better :)
from neodev.nvim.
Related Issues (20)
- bug: vim.fn.getreg third parameter type is incorrect HOT 2
- bug: requires not resolved correctly on multiple workspaces
- bug: vim.iter is not found after https://github.com/neovim/neovim/pull/23303 HOT 7
- bug: compatibility with latest lua language server (workspace.library error) HOT 1
- bug: sign_place() can't accept buffer name as "buf" param HOT 2
- bug: Can't get completion for plugins HOT 15
- bug: duplicated/shorter documentation with neodev HOT 3
- bug: Inconsistent application of `override` function HOT 1
- feature: just get the LSP server settings
- feature: Type inference with lazy `opts` HOT 1
- feature: Resolve symlink
- feature: Possibly generate luacheckrc or selene configs of the neovim API? HOT 4
- bug: `too many open files` when the workspace is large HOT 1
- bug: neodev with lspconfig and custom on_attach HOT 1
- Remove nightly meta annotations conflicting with upstream neovim HOT 1
- New releases?
- bug: example .neoconf.json uses "sumneko_lua" instead of "lua_ls" HOT 2
- bug: Recent attempt to fix the double Lua LSP workspace loading progress seems to break Lua indexes in certain situations HOT 3
- bug: no completions in `~/.config/nvim/after` directory HOT 4
- bug: neodev not working with mason-lspconfig HOT 8
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 neodev.nvim.