Giter VIP home page Giter VIP logo

Comments (21)

p1k0pan avatar p1k0pan commented on July 21, 2024 1

DeepinScreenshot_select-area_20210830143126
yes

Your go.mod need line like this:
gomod
The module name is your root_dir's name normally. Its gopls's request.

Oh sorry I just run the go file and it said go.mod not set up , and I follow the default set up for go.mod and finally worked, just like your advise. I really appreciate your neovim set up. Thanks again!!

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

Servers installed by nvim-lspinstall is stored permanently on your disk.
You can execute ls ~/.local/share/nvim to check if a directory called lspinstall exists.

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

lspinstall

from nvimdots.

j2501987804 avatar j2501987804 commented on July 21, 2024

image

from nvimdots.

j2501987804 avatar j2501987804 commented on July 21, 2024

image
I have already installed it, and it will not be loaded automatically. Every time I open vim, I have to execute it manually: lspinstall go

#21 (comment)

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

execute LspInfo when you enter this buffer, correct result is like this:
lspinstall

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

You may need to git pull to get my latest updates.

from nvimdots.

j2501987804 avatar j2501987804 commented on July 21, 2024

image

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

Do you have go.mod in this directory?

from nvimdots.

j2501987804 avatar j2501987804 commented on July 21, 2024

#21 (comment)
Just pull is still not working, the directory has go.mod

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

The correct sequence is this:

  1. make the package dir.
  2. touch go.mod.
  3. touch main.go.
  4. vim main.go.
    sequence

success

from nvimdots.

1096015776 avatar 1096015776 commented on July 21, 2024

hey , does your go work? i try it and it work ,just touch go.mod and main.go,it work.
i find if i not touch main.go,I just nvim main.go,the lsp is not work,may this is answer.
so you should touch main.go then nvim main.go

from nvimdots.

1096015776 avatar 1096015776 commented on July 21, 2024

截屏2021-08-29 下午6 57 28
截屏2021-08-29 下午6 57 11

from nvimdots.

p1k0pan avatar p1k0pan commented on July 21, 2024

Mine is not work on go, but it work on python. I runned LspInstall python just like I runned LspInstall go, but python can work automatically and go failed.

from nvimdots.

p1k0pan avatar p1k0pan commented on July 21, 2024

DeepinScreenshot_select-area_20210830125613
I assume that Lsp server has installed the gopls ,but the autocompletion not configure.
How to set it up?

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

Mine is not work on go, but it work on python. I runned LspInstall python just like I runned LspInstall go, but python can work automatically and go failed.

golsp need to detect your directory if a work directory or not. Please refer to this and this.

from nvimdots.

p1k0pan avatar p1k0pan commented on July 21, 2024

Mine is not work on go, but it work on python. I runned LspInstall python just like I runned LspInstall go, but python can work automatically and go failed.

golsp need to detect your directory if a work directory or not. Please refer to this and this.

Thank you for your time for a newbee. It work well after adding go.mod . However I wonder why the autocompletion on go still not perform like on python, when I want to type Print, it does not show any code suggestion. Is there anything that I should set up?

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

Mine is not work on go, but it work on python. I runned LspInstall python just like I runned LspInstall go, but python can work automatically and go failed.

golsp need to detect your directory if a work directory or not. Please refer to this and this.

Thank you for your time for a newbee. It work well after adding go.mod . However I wonder why the autocompletion on go still not perform like on python, when I want to type Print, it does not show any code suggestion. Is there anything that I should set up?

Did gopls attact to your buffer? You can check this via lualine quickly. Autocompletion is out of the box if gopls starts correctly.

from nvimdots.

p1k0pan avatar p1k0pan commented on July 21, 2024

DeepinScreenshot_select-area_20210830143126
yes

from nvimdots.

ayamir avatar ayamir commented on July 21, 2024

DeepinScreenshot_select-area_20210830143126
yes

Your go.mod need line like this:
gomod
The module name is your root_dir's name normally. Its gopls's request.

from nvimdots.

JerryAllison avatar JerryAllison commented on July 21, 2024

没有lspinstall命令
image

from nvimdots.

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.