latex-lsp / texlab

An implementation of the Language Server Protocol for LaTeX
GNU General Public License v3.0
1.49k stars 51 forks source link

Compile on save doesn't work in neovim #1136

Closed timsofteng closed 2 months ago

timsofteng commented 2 months ago

Hello.

I use neovim with native lsp and texlab and nvim-texlabconfig.

I see no files near my .tex file after compilation.

Here is my config

lspconfig.texlab.setup({
    autostart = false,
    on_attach = on_attach,
    capabilities = capabilities,
    handlers = handlers,
    setting = {
        texlab = {
            auxDirectory = ".",
            build = {
                executable = "tectonic",
                args = {
                    "-X",
                    "compile",
                    "%f",
                    "--synctex",
                    "--keep-logs",
                    "--keep-intermediates",
                },

                forwardSearchAfter = true,
                onSave = true,
                auxDirectory = ".",
            },
            forwardSearch = {
                -- https://github.com/f3fora/nvim-texlabconfig?tab=readme-ov-file#skim
                executable = "/Applications/Skim.app/Contents/SharedSupport/displayline",
                args = { "%l", "%p", "%f" },
            },
        },
    },
})
image

LspLog is empty. Tectonic is installed.

DasNaCl commented 2 months ago

Probably a typo. Use settings = instead of setting =.

timsofteng commented 2 months ago

@DasNaCl you are absolutely right! Thanks! I've copied this syntax from https://github.com/f3fora/nvim-texlabconfig

image