Giter Club home page Giter Club logo

Comments (12)

jmbuhr avatar jmbuhr commented on July 30, 2024

With your minimal configuration I noticed that indeed I don't get code completion right after opening the file, but it works fine after having used e.g. K to show the documentation once.
(I had to disable marksman because I don't have it installed on this machine).
image

Can you confirm that this is the same for you? And can you also try it with the official kickstarter configuration: https://github.com/jmbuhr/quarto-nvim-kickstarter?

from otter.nvim.

fasterius avatar fasterius commented on July 30, 2024

Thanks for the quick reply!

I can confirm that the minimal config works after using K. It also works using the quarto-nvim-kickstarter, even without having to use K before. I did try this earlier, actually, but the kickstarter does not work inside Conda environments (even when I disable Mason to not auto-install anything and just use manually installed LSPs inside the Conda environments; I never got Mason working inside Conda for any LSP).

The Conda-problem was actually what lead me to start troubleshooting - I'm basically inside a Conda environment 100% of the time, so that's a must-have-functionality for me. When I started troubleshooting I couldn't even get Otter working outside of Conda, so I figured "one thing at a time", hence me not mentioning this before.

from otter.nvim.

jmbuhr avatar jmbuhr commented on July 30, 2024

Interesting, I have also tried it in a conda enviroment and it works for me, specifically with mason. Do you maybe have some things installed in the enviroment, like lsp servers, that shadow the lsp servers by mason?

What does the output of :LspInfo and CmpStatus look like in a fully loaded qmd file with e.g. R code chunks?

from otter.nvim.

jmbuhr avatar jmbuhr commented on July 30, 2024

Conda is pretty notorious for these sorts of things...

from otter.nvim.

jmbuhr avatar jmbuhr commented on July 30, 2024

Another Idea if have specifically for R: When using the renv package for an isolated enviroment I have to install the r language server in there as well. Maybe you have something similar going on.

from otter.nvim.

jmbuhr avatar jmbuhr commented on July 30, 2024

So it looks like this is another, not an otter, problem ;)

from otter.nvim.

fasterius avatar fasterius commented on July 30, 2024

Okay, then I'd be very interesting to know how to set that up, since all I'm getting when using Mason in a Conda environment are things like Client 1 quit with exit code 1 and signal 0 when an LSP is started :-/ I have tried to both have and not have language servers inside Conda with Mason and the results are the same. Since it never worked at all while not using Mason and installing them manually worked for everything except Otter that's what I ran with.

Here are some screenshots, both from the minimal config and my full config:

LspInfo (minimal config)
Screenshot 2023-02-02 at 15 31 59

LspInfo (my full config):
Screenshot 2023-02-02 at 15 23 00

CmpStatus (minimal config, before K):
Screenshot 2023-02-02 at 15 29 49

CmpStatus (minimal config, after K):
Screenshot 2023-02-02 at 15 28 40

CmpStatus (my full config, regardless of K):
Screenshot 2023-02-02 at 15 23 46

So, the otter source is somehow not being recognised at various stages? If it really is "another" problem rather than an otter problem (:-P), do you have any idea where the problem might lie?

from otter.nvim.

jmbuhr avatar jmbuhr commented on July 30, 2024

LspInfo tells you where the logfile for your language servers is. This may tell you why the language server crashes in a conda environment.

from otter.nvim.

jmbuhr avatar jmbuhr commented on July 30, 2024

Also note that the otter source is by design only available when your cursor is inside of a code chunk.

from otter.nvim.

fasterius avatar fasterius commented on July 30, 2024

Okay, I have no idea why it works now, but after switching back-and-forth between the configs a bit it just works now, both outside and inside Conda environments! I only get completion like a third of the time without doing :LspInfo, but after doing that it seems to work! Using K only worked most of the time, for some reason, while :LspInfo worked all of the time. I also tried waiting a long time before going into insert mode to see if it was some kind of loading-related issue, but it didn't make any difference.

I'm real sorry for taking up your time! 😓 I don't know why it works now, but it does - having to type :LspInfo once before starting some coding is slightly annoying, but it's an annoyance I can live with. No idea whether that particular weirdness is related to nvim-cmp, lsp-config, quarto-nvim or otter.nvim 😅

from otter.nvim.

jmbuhr avatar jmbuhr commented on July 30, 2024

Ok. There may still be a lessen here about when the lsp server starts up and when the client attaches and I may find a solution to make sure it starts up a small while before you actually need it. Do let me know if you find something!

from otter.nvim.

fasterius avatar fasterius commented on July 30, 2024

Will do!

from otter.nvim.

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.