Git Product home page Git Product logo

Comments (10)

pfoerster avatar pfoerster commented on July 28, 2024

@martinra Do you have a ~/.latexmkrc file? If so, then #1062 should fix the issue.

from texlab.

martinra avatar martinra commented on July 28, 2024

I do. I also pulled #1062 and the project root is now detected correctly. Thanks a lot the quick solution!

from texlab.

pitkling avatar pitkling commented on July 28, 2024

Is this truly fixed @pfoerster? I still have the exact same issue under both v5.14.1 (from nixpkgs-unstable) and v5.15.0 (from Homebrew). I used the minimal example mentioned by @martinra to test it. As long as my ~/.latexmkrc is present, the project root is not recognized.

More exactly:

  • with ~/.latexmkrc:
    • if I have ~/tmp/.latexmkrc, the project root is correctly identified as ~/tmp/
    • if I have ~/tmp/latexmkrc (without the dot), the project root is incorrectly identified as ~/
    • similarly, I get the incorrect project root with any of the following files: ~/tmp/texlabroot, ~/tmp/.texlabroot, and ~/tmp/.git
  • without ~/.latexmkrc:
    • the project root is correctly identified if there is either ~/tmp/.git or ~/tmp/.latexmkrc
    • in all other cases (no special files, ~/tmp/texlabroot, ~/tmp/.texlabroot, ~/tmp/latexmkrc) the project root is seemingly not set at all (the log of texlab reports it as null)

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@pitkling How are you checking the project root? Compiling the project, looking at the dependency graph or something else? How does the wrong project root show itself?

from texlab.

pitkling avatar pitkling commented on July 28, 2024

@pfoerster I used :LspInfo of neovim/nvim-lspconfig and also double checked via the log file created bis texlab --log-file <file>. Is this reproducible on your end or is it specific to my setup? Let me know if I can provide any further info to debug this.

from texlab.

pfoerster avatar pfoerster commented on July 28, 2024

@pitkling

Is this reproducible on your end or is it specific to my setup?

With VSCode, I am not able to reproduce it. Is the working directory of the editor (and thus the server) set to ~ or ~/tmp. If it is ~, then #1098 should have fixed this issue.

from texlab.

pitkling avatar pitkling commented on July 28, 2024

The working directory of Neovim seems not to matter. I tested it by starting Neovim from ~/, from ~/tmp/, and from a different subdirectory of ~/. Neovim's :LspInfo still reports ~/ as the root directory if ~/tmp/.latexmkrc is not present. Again, other indicator files (~/tmp/{texlabroot,.texlabroot,.git}) do not help either.

I also made sure to disable any other unrelated Neovim configuration/plugins and only load texlab via Neovim/nvim-lspconfig.

from texlab.

pitkling avatar pitkling commented on July 28, 2024

@pfoerster In case it helps, here is texlab's log file (maximum verbosity) when opening ~/tmp/main.tex in a minimal Neovim configuration. I had the following project root indicator files present: ~/tmp/{texlabroot,.texlabroot,.git,latexmkrc}. As the log file indicates, texlab sets ~/ as the project root.

from texlab.

clason avatar clason commented on July 28, 2024

This is an nvim-lspconfig issue (root directory detection is part of the client configuration shipped by this plugin); please open the issue there.

from texlab.

pitkling avatar pitkling commented on July 28, 2024

Ok, thanks for the pointer, I thought nvim-lspconfig takes the root directly from texlab.

P.S.: Feel free to close the issue again, and sorry for the noise. Also, in case someone finds this: The problem has been fixed a few months back in nvim-lspconfig.

from texlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.