nim-lang / NimLime

The official Nim programming language plugin for Sublime Text
MIT License
132 stars 34 forks source link

ESC should remove nimfix error annotations in source file #131

Closed timotheecour closed 1 year ago

timotheecour commented 5 years ago

/cc @Varriount let me know if you need more details/description

Varriount commented 5 years ago

My biggest concern is that this would conflict with other plugins. Plus, users can create their own key combos. Given that there's already a command in the command palette, would this really add anything substantial?

timotheecour commented 5 years ago

I understand your concern, but at least API should allow for user to define a key combo/menu item to remove the red error annotations, see example below:

image

you can reproduce with:

when defined(foo):
  proc fun1()=
    discard

fun1()
Varriount commented 5 years ago

@timotheecour The used can create a custom hotkey using the same command that is run from the command palette .

timotheecour commented 5 years ago

the same command that is run from the command palette

grepping for it I only see:

Default (Linux).sublime-keymap:2:35:    {"keys": ["f12"], "command": "gotodef", "context":
Default (OSX).sublime-keymap:2:35:    {"keys": ["f12"], "command": "gotodef", "context":
Default (Windows).sublime-keymap:2:35:    {"keys": ["f12"], "command": "gotodef", "context":

but I'm not seeing it defined in py file in NimLime repo, as follows:

class gotodef(sublime_plugin.WindowCommand):

note

here's another example: it's quite annoying to edit a file with all the red annotations:

image