Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <Plug>(ale_find_references_relative) to use for mapping #3314

Closed
Andoku opened this issue Aug 26, 2020 · 2 comments
Closed

Add <Plug>(ale_find_references_relative) to use for mapping #3314

Andoku opened this issue Aug 26, 2020 · 2 comments

Comments

@Andoku
Copy link

Andoku commented Aug 26, 2020

We can run command with argument:
:ALEFindReferences -relative
But there is no (ale_find_references_relative) to use as for key mappings.

@Andoku Andoku changed the title Add <Plug>(ale_find_references_relative) to use for shortcuts Add <Plug>(ale_find_references_relative) to use for mapping Aug 26, 2020
@w0rp
Copy link
Member

w0rp commented Aug 27, 2020

There are currently 8 possible variations for the command, as you can combine -relative with -tab, -vsplit, and -split. There will probably be more options in future. I don't want to define any more <Plug> mappings, as we'll end up with a combinatorial explosion of mappings, which will gradually increase plugin load times by a lot. I recommend creating your own instead.

nnoremap <silent> <Plug>(ale_find_references_relative) :ALEFindReferences -relative<Return>

I was going to remove the additional mappings for :ALEGoToDefinition and :ALEGoToTypeDefinition as a breaking change for ALE 3.0, but I decided to just keep them forever, and never add any more additional plug mappings for future options for commands.

@w0rp
Copy link
Member

w0rp commented Aug 27, 2020

I updated the documentation now to explain how to write new <Plug> mappings for ALEFindReferences.

jsit added a commit to jsit/ale that referenced this issue Aug 28, 2020
* master: (195 commits)
  Close dense-analysis#3285 - lint_file is now dynamic
  Close dense-analysis#3309 - Add b:ale_lint_delay
  Fix dense-analysis#3323 - Set default for g:ale_filename_mappings
  Add sql-lint to supported tools
  dense-analysis#3324 - Enable rls by default
  Set prettier working directory to where .prettierignore is (dense-analysis#3101)
  Fix dense-analysis#3319 - Force modifications to buffers
  Fix dense-analysis#3318 - Escape macros when parsing C flags
  Fix C flag parsing and tests on Windows
  Mention --fast, and document running Windows tests locally
  dense-analysis#3318 Refactor C flag parsing to set up for quoting arguments
  dense-analysis#3266 - Catch echo visual selection errors
  Label the test cases more clearly
  Fix dense-analysis#3317 - Parse -include from C flags
  Fix dense-analysis#3316 - Repeat -relative for ALERepeatSelection
  Fix dense-analysis#3307 - Handle compile_commands paths better
  Fix a typo
  dense-analysis#3314 - Tell people how to make new plug mappings
  dense-analysis#3312 - Just check if additionalTextEdits is non-empty
  Fix dense-analysis#3312 - Fix a false positive for auto imports
  ...
w0rp pushed a commit that referenced this issue Jan 14, 2021
* Add nvim floating window hover support
* Add configuration for float to replace preview
* preview#ShowFloating: qualify local variables
* Configure floating preview usecases individually

Also:
  * Extract floating preview to its own file.
  * Ignore 'stay_here' option. Moving into the floating preview window
    seems confusing at best.
  * Re-use existing floating preview window if it's still up.
  * Flush out floating preview documentation.

* Watch cursor position changes per window

Floating previews open a new window, so when that window is written to,
it moves briefly there at a different position than the original window.
This makes repeated positions detected when positions are tracked at a
s: level. Instead, we change the variable to window scoped, which only
fires a message if the cursor has changed from the last position in
*that window*.

* g:ale_floating_preview cleanup
* floating_preview: add ALEDetail tests
* Fix fecs test missing runtime call
* Add ALEHover floating preview tests

Co-authored-by: Jan-Grimo Sobez <jan-grimo.sobez@phys.chem.ethz.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants