Comments (7)
Thanks @Req23. That's helpful!
I don't know the details on how templ
LSP server proxies gopls.
gopls v0.16.0+ started to use InsertReplaceEdits
if the client sets the capability. (https://github.com/golang/tools/blob/master/gopls/internal/protocol/tsprotocol.go#L1024).
If the templ
LSP relies on github.com/a-h/protocol, I see that it does not handle InsertReplaceEdits
type yet
(https://github.com/a-h/protocol/blob/b4eec67c1c223e5a747d39f3d07f62d25236aa4a/language.go#L260).
I think the templ
LSP server needs to either
- update the protocol to support
InsertReplaceEdits
, or - adjust the client capability so
InsertReplaceSupport
is unset before forwarding the capability.
Can you please open an issue to the a-h/templ repo? Thanks!
from vscode-go.
I guess you are using a-h/templ. Isn't the templ extension able to handle auto-complete?
https://templ.guide/commands-and-tools/ide-support/#visual-studio-code
cc @a-h
from vscode-go.
Yeah I am using a-h/templ
along with the vscode-go
extension. I followed the guide for VSC with vscode-go + a-h/templ. I thought maybe the go side of it was responsible for the imports, auto completes, etc.
from vscode-go.
Auto completion is working with:
gopls v. 0.15.3
and
a-h/templ from @main
The newest version of gopls and templ didn't seem to work together. Just letting you know what I found.
from vscode-go.
I will close this issue since this is beyond the go extension's scope.
Thank you so much for filing the issue in a-h/templ!
from vscode-go.
Thanks for raising this. Without this feature, gopls v0.16.x
won't work properly with templ.
I've updated protocol in a-h/protocol@1e461c1
And I've updated templ in a-h/templ@26c1d79
from vscode-go.
Nice investigation @hyangah!
from vscode-go.
Related Issues (20)
- Use dotenv for reading env files HOT 1
- remove double space in "func" snippets
- gopls: automated issue report (crash) HOT 1
- NON retour a la ligne et Non espace HOT 2
- gopls: automated issue report (crash) HOT 3
- Takes ages to save file on windows
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 1
- debug golang project, breakpoint is invalid HOT 7
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 2
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 2
- Release v0.42.0 HOT 5
- testing: Install Tests using the local fake proxy fail with go1.19/1.20 HOT 2
- gopls: automated issue report (crash) HOT 1
- gopls: automated issue report (crash) HOT 1
- debug: Launch Package template triggered with no config does not match the templates in `package.json`
- gopls: automated issue report (initialization) HOT 1
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 vscode-go.