Coder Social home page Coder Social logo

Using nvim-gps plugin about nvim HOT 7 CLOSED

ecosse3 avatar ecosse3 commented on May 3, 2024
Using nvim-gps plugin

from nvim.

Comments (7)

LSleutsky avatar LSleutsky commented on May 3, 2024 1

Check out if you have correct lsp servers enabled by :LspInfo command. Make sure that they are uncommented in lsp/config.lua. Maybe you are running your project from different root directory and tsserver cannot recognize tsconfig.json or eslint cannot find eslintrc config file. Run :pwd to make sure you are in root directory of project.

For me LspInfo shows either tsserver and eslint for example: image

Everything you mentioned above is set up properly. I was able to get nvim-gps to work by using the latest stable version of Neovim, instead of the nightly builds, so must have been something with the nightly builds your config didn't like. So that's the main problem down. I'll close this issue since the ones I mentioned above are unrelated, thought I do have everything setup properly, from LSP to Treesitter and all the configs, based on what you've mentioned in this thread. Will keep trying. Thanks again for your help!

from nvim.

ecosse3 avatar ecosse3 commented on May 3, 2024 1

@LSleutsky Glad it works. I use the latest NVIM v0.7.0-dev+751-g67bb01ae2 version and I see that by the first time I enter some file GPS is not shown. After I press to save file or type :w then it shows. Maybe it is some problem with lazy loading (it's just after treesitter) or with the plugin inself. Try if it shows when you save file.

from nvim.

ecosse3 avatar ecosse3 commented on May 3, 2024

Hi. I'm not sure what you mean by that. nvim-gps is already implemented in Ecovim and it shows the current method context in galaxyline status bar as in screenshot (right side of LSP indicators):

https://raw.githubusercontent.com/ecosse3/nvim/master/.screenshots/4-main.png

Maybe your screen is too short to show everything in the statusbar? If yes, you need to disable the absolute path of file in statusbar or change it to relative (you can still see absolute by vim keybinding).

from nvim.

LSleutsky avatar LSleutsky commented on May 3, 2024

Yep, that’s the issue I’m having. What you see in your screenshot with the method name, does not work on my end.

Don’t think it’s my monitor size, since I have a 3 monitor setup of 2 monitors being 32 inch wide screens and another 27 inch wide screen. Very weird, what you have in your screenshot is exactly what I am after, but can’t get to show….

from nvim.

ecosse3 avatar ecosse3 commented on May 3, 2024

@LSleutsky I checked it again by installing my Ecovim config via installer on Linux and macOS from scratch, and nvim-gps doesn't work only if you don't have javascript/typescript/tsx installed via Treesitter.

Did you run :TSInstall command with specified languages?

After installing by :TSInstall javascript typescript tsx nvim-gps runs correctly in statusline and shows current context. It takes a bit (~10sec) by first time because of lazyloading.

from nvim.

LSleutsky avatar LSleutsky commented on May 3, 2024

@LSleutsky I checked it again by installing my Ecovim config via installer on Linux and macOS from scratch, and nvim-gps doesn't work only if you don't have javascript/typescript/tsx installed via Treesitter.

Did you run :TSInstall command with specified languages?

After installing by :TSInstall javascript typescript tsx nvim-gps runs correctly in statusline and shows current context. It takes a bit (~10sec) by first time because of lazyloading.

Thanks for the reply again, but unfortunately it does not for me. I tried to reinstall neovim completely and install your config from scratch, and still it does not display.

There are a few other issues I'm having, like ESLint/Prettier not properly displaying error messages when something is wrong, along with some other items. In the screenshot above, where you have the red error underline where you have setProductInEditMode('false') and an error message, I never get anything like that, but I had before a on previous SpaceVim build I had, with coc. The app I work on, for example, explicitly uses backticks for strings, for example, rather than just ' or ". When I change the backticks to quotes, I would expect to see a linting error, but I see nothing.

Which version of Neovim are you running? I am running the latest nightly builds? Could the issues I'm seeing be related to that you think? In any case, I will try and downgrade to the latest stable build when I get back to my personal laptop. Sorry for kind of branching out into some other issues slightly, but if you have any other tips or suggestions, I'm all ears....

Thanks!

from nvim.

ecosse3 avatar ecosse3 commented on May 3, 2024

Check out if you have correct lsp servers enabled by :LspInfo command. Make sure that they are uncommented in lsp/config.lua. Maybe you are running your project from different root directory and tsserver cannot recognize tsconfig.json or eslint cannot find eslintrc config file. Run :pwd to make sure you are in root directory of project.

For me LspInfo shows either tsserver and eslint for example:
image

from 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.