Skip to content

[WIP] cmd/govim: add AST-based highlighting#24

Closed
myitcv wants to merge 1 commit intomasterfrom
rework_ast_highlight
Closed

[WIP] cmd/govim: add AST-based highlighting#24
myitcv wants to merge 1 commit intomasterfrom
rework_ast_highlight

Conversation

@myitcv
Copy link
Copy Markdown
Member

@myitcv myitcv commented Mar 20, 2019

Demo: https://youtu.be/OGtby_bjNUY

TODO:

  • work out what bug is causing some matchaddpos calls to "stall"
  • we should throttle buffer updates
  • make it work for raw string literals. Currently does not work because the highlight is line-oriented, and raw string literals can span multiple lines
  • batch calls to matchaddpos and deletematch:
    • group matchaddpos calls into line-based updates
    • make the calls to matchaddpos silent so that Vim does not redraw after each one
    • explicitly redraw once done
  • only re-highlight when the view window changes
  • raise a Vim feature request for an event to be fired when the viewport changes, where "viewport" is defined (for now) as getwininfo() minus the "variables" key

@myitcv myitcv force-pushed the rework_ast_highlight branch 4 times, most recently from 482e50b to 02ba44a Compare March 25, 2019 12:37
@myitcv myitcv changed the title [WIP] cmd/govim: rework AST-based highlighting [WIP] cmd/govim: add AST-based highlighting Mar 25, 2019
@myitcv myitcv force-pushed the rework_ast_highlight branch from 02ba44a to 8eb2567 Compare March 25, 2019 12:38
@myitcv myitcv force-pushed the rework_ast_highlight branch 8 times, most recently from 5adaf9b to 07f1e91 Compare March 26, 2019 19:45
@myitcv myitcv force-pushed the rework_ast_highlight branch 7 times, most recently from e47cd17 to 6ae0b9b Compare April 3, 2019 11:48
@myitcv myitcv force-pushed the rework_ast_highlight branch 2 times, most recently from 10c0405 to 0b6c6c7 Compare April 7, 2019 09:16
@myitcv myitcv force-pushed the rework_ast_highlight branch from 0b6c6c7 to 88d4283 Compare April 13, 2019 18:26
myitcv added a commit that referenced this pull request May 30, 2019
Vim is not currently in a position to be able to accurately push
viewport changes to govim. Hence, we might as well drop this code, not
least because it clutters the log messages having the viewport changes
being pushed the whole time. But also because we don't have anything in
govim that relies on knowing when the viewport changes (that is #24).

This should also make adding the Neovim support easier.
myitcv added a commit that referenced this pull request May 30, 2019
Vim is not currently in a position to be able to accurately push
viewport changes to govim. Hence, we might as well drop this code, not
least because it clutters the log messages having the viewport changes
being pushed the whole time. But also because we don't have anything in
govim that relies on knowing when the viewport changes (that is #24).

This should also make adding the Neovim support easier.
myitcv added a commit that referenced this pull request May 30, 2019
Vim is not currently in a position to be able to accurately push
viewport changes to govim. Hence, we might as well drop this code, not
least because it clutters the log messages having the viewport changes
being pushed the whole time. But also because we don't have anything in
govim that relies on knowing when the viewport changes (that is #24).

This should also make adding the Neovim support easier.
@myitcv myitcv added this to the Unplanned milestone Jul 14, 2019
@myitcv myitcv added the onhold Probably pending some 3rd party issue label Sep 24, 2019
@myitcv myitcv closed this Jan 26, 2020
@myitcv myitcv deleted the rework_ast_highlight branch January 26, 2020 09:14
@myitcv
Copy link
Copy Markdown
Member Author

myitcv commented Jan 26, 2020

Closing for now. We can pick this up again later if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

onhold Probably pending some 3rd party issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant