Comments (2)
Think I found what caused it to me. The documentation is slightly confusing (?).
I follow the lazyvim instructions:
This I assume means that you should add the line to ~/.vimrc:
![image](https://private-user-images.githubusercontent.com/134628590/294785293-c572eff0-d6e0-4705-a3c7-1f298a3574dd.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2Mzk0ODUsIm5iZiI6MTcxOTYzOTE4NSwicGF0aCI6Ii8xMzQ2Mjg1OTAvMjk0Nzg1MjkzLWM1NzJlZmYwLWQ2ZTAtNDcwNS1hM2M3LTFmMjk4YTM1NzRkZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQwNTMzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hZWI3ZjNmZjEyZjU1ZjllYjBmYzEyOTc2NjAyNzVlYTJhZmE1NjNkNDNkOTI2OTViZTJiZmZiOWMxMGVmYmMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.MDq-OfXw8EnMDR9M4fFmQbsrpE-ZKhTb9Wze_MRk68g)
Adding it to ~/.vimrc does nothing for me, but I had it added to my init.lua as a test since its lua anyway:
Now these strange truncation things starts to happen on indents, so I removed the above lines.
These does not seem need as well (at least in lazyvim): require('go.format').goimport()
because everything is default in ~/.local/share/nvim/lazy/go.nvim/lua/go.lua already as I interpret it
If you look at the general documentation for format and save, it does mentions init.lua instead of vimrc:
![image](https://private-user-images.githubusercontent.com/134628590/294786828-9c770096-d468-4d3a-8628-a8faf3bb7c3f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2Mzk0ODUsIm5iZiI6MTcxOTYzOTE4NSwicGF0aCI6Ii8xMzQ2Mjg1OTAvMjk0Nzg2ODI4LTljNzcwMDk2LWQ0NjgtNGQzYS04NjI4LWE4ZmFmM2JiN2MzZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQwNTMzMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lY2YyMjc5OGI1NjFlZDZmYWUwYTk2YjE5ZWI2YzU5NTI1MGFlYTg4MGU1OWFlOTIzNDJhODFhOTAzZmIxZjcwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.D_VmzORWNpDFZhdGT309-Rajc7jy8yKu-75sVSU9koo)
I dunno, the neovim ecosystem(s) are bit hard to figure out so maybe I have missed something obvious.
from go.nvim.
Lazyvim and go.nvim here.
Just noticed this as well.
Example:
I have DelTask() string
then add 5 spaces before DelTask() and when I save, it gets truncated to
sk() string
.
Not exactly sure how to troubleshoot yet, but will poke around and find out hopefully.
from go.nvim.
Related Issues (20)
- neovim nightly changed the inlay hint api again.
- [change request] quickfix behavior when running :GoBuild HOT 2
- /usr/share/nvim/runtime/lua/vim/lsp/inlay_hint.lua:375: enable: expected boolean, got table HOT 5
- [Windows] `:checkhealth` does not report true for `GOBIN` and `GOROOT` HOT 1
- inlay_hint.lua:383: enable: expected boolean, got table HOT 2
- vim.lsp.get_active_clients() is deprecated, use vim.lsp.get_clients() instead HOT 2
- Bug: diagnostic api change not work in neovim 0.10. HOT 2
- [null-ls] failed to run generator: ...go/null_ls.lua:201: attempt to index field 'golangci_lint' (a nil value) HOT 6
- Diagnostic update in insert not working HOT 7
- gopls -debug=localhost:8080 HOT 2
- set diagnostic to `false` will be error
- vim shows import error until re-open HOT 2
- How to get highlights and injections to work with go-templates
- New? enable: expected boolean, got number HOT 2
- Provide a way to run alternate command for eg. go and go test HOT 2
- Error from InsertLeave Autocmd, codelens not supported
- 'Buffer file://<filepath> newer than edits.' when importing things on neovim nightly (0.11.0) HOT 2
- GoRun try install package run HOT 8
- How to avoid conflict with navigator HOT 3
- help finding autocomplete bug: extmark/helper text persists. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go.nvim.