-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/govim: temporary implementation of file watching
For now use textDocument/didOpen and textDocument/didChange to deal with generated files changing, whilst we await a proper implementation in gopls via golang/go#31553.
- Loading branch information
Showing
10 changed files
with
383 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Test that ominfunc complete works where the completion is made | ||
# available in a file that is not loaded via the editor. | ||
|
||
vim ex 'e main.go' | ||
cp const.go.orig const.go | ||
vim ex 'call cursor(6,16)' | ||
vim ex 'call feedkeys(\"i\\<C-X>\\<C-O>\\<C-N>\\<C-N>\\<ESC>\", \"x\")' | ||
vim ex 'w' | ||
cmp main.go main.go.golden | ||
|
||
-- go.mod -- | ||
module mod.com | ||
|
||
-- main.go -- | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println() | ||
} | ||
-- const.go.orig -- | ||
package main | ||
|
||
const ( | ||
Const1 = 1 | ||
Const2 = 2 | ||
) | ||
-- main.go.golden -- | ||
package main | ||
|
||
import "fmt" | ||
|
||
func main() { | ||
fmt.Println(Const2) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.