Closed SirLukeSchande closed 3 years ago
What's your texlab version? The command works for me as advertised (on macOS).
I am currently on texlab 3.3.0
.
Then the usual suspicion is that you have an older version of lspconfig lying around somewhere that is being used instead of the one you are looking at.
It shouldn't play a role, but there are always problems with changing the outdir
. Try removing that. (In fact, remove all build
settings.)
The nvim-lsp version I stated above is the one i got from PlugSnapshot
. That should be the current version, right?
The Error persists even without the outdir
Try moving the -g
argument:
forwardSearch = {
executable = '/Applications/Skim.app/Contents/SharedSupport/displayline',
args = { '%l', '%p', '%f', '-g' },
},
This doesn't change anything.
OK, last guess: Are you sure that the PDF is actually built?
Yes, I use the :TexlabBuild all the time.
I cannot reproduce your problem at all, so I'll close the issue for now -- feel free to reopen when you have found a minimal reproducible example (including TeX files and a full and explicit set of steps).
The only actual issue here that I can see is when you're trying to forward-search into a PDF that does not exist yet (because it's not built) -- then you get the above error because Texlab does not return an error code when the search fails. There's nothing we can do about it; that is something the server needs to change.
So I just found something that could narrow down the source of the error. When i first cd into the directory the .tex
file is in and then open the file directly, i.e. not over startify or with the :e
command inside neovim, the forward search works perfectly. But if I leave out either of the two I still get the error.
Does that help to narrow down what the error is?
Description
When running
:TexlabForward
I get the follwing error:Error executing vim.schedule lua callback: ...ack/packer/start/nvim-lspconfig/lua/lspconfig/texlab.lua:51: attempt to index local 'result' (a nil value)
I use Skim as previewer. The rest of the language server works flawlessly.
Neovim version
NVIM v0.6.0-dev+b9a35ec7a Build type: Release LuaJIT 2.1.0-beta3
Nvim-lspconfig version
7f902f952944aa708c78138f6536c0dc55aec3a2
Operating system and version
macOS 11.6
Affected language servers
texlab
Steps to reproduce
.tex
file and run:TexlabForward
Actual behavior
Error executing vim.schedule lua callback: ...ack/packer/start/nvim-lspconfig/lua/lspconfig/texlab.lua:51: attempt to index local 'result' (a nil value)
Expected behavior
Skim should open at the position the cursor is at.
Minimal config
Health check
lspconfig: require("lspconfig.health").check()
LSP log
https://gist.github.com/SirLukeSchande/0396ef03dcdba655d3cfc01f77d9d6f9