Commit Graph

5 Commits

Author SHA1 Message Date
Loric Brevet
199b7ea165
Adjust regex in gopls-def for when filepath contains a dash
When calling `:gopls definition`, the gopls LSP server returns the location of
the selected definition. Then, `gopls.kak` tries to parse this output to
feed the `:edit` command and open the file in Kakoune. To do this, it
uses `sed` to transform `<path>.go:<line>:<colstart>-<colend>` to `<path>.go
<line> <colstart>`. However, if the `<path>` contains a dash character,
the `sed` will fail and strip everything after this first dash, removing
the line and columns information.

Closes #4776
2022-11-15 10:10:24 +01:00
voroskoi
dd6a275c3e
gopls.kak: use nop for removing temp dir
Co-authored-by: Frank LENORMAND <1379068+lenormf@users.noreply.github.com>
2020-10-17 09:47:07 +02:00
VÖRÖSKŐI András
cbbab07aab gopls: Fix format/imports error reporting
Remove unnecessary single quotes and whitespaces in %file{}
Do not delete error file before sending to debug buffer
Fix gopls definition error handling and empty sting check
Silence shellcheck warnings
2020-10-16 22:40:58 +02:00
VÖRÖSKŐI András
9fe1a2a9a4 gopls: fixes based on krobelus@ review 2020-09-16 21:58:22 +02:00
VÖRÖSKŐI András
568020d67b rc gopls.kak: initial import
Add support for the following gopls commands:
 - format
 - imports
 - definition
 - references

Thanks krobelus@ and lenormf@ for their review and suggestions.
2020-09-15 01:01:35 +02:00