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

LSP autocomplete useless with napi macros #944

Open
mischnic opened this issue Dec 18, 2021 · 5 comments
Open

LSP autocomplete useless with napi macros #944

mischnic opened this issue Dec 18, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@mischnic
Copy link
Contributor

mischnic commented Dec 18, 2021

I can see how/why this happened, but from a user's perspective autocomplete being broken inside of constructs using the napi macro is very frustrating.

Bildschirmfoto 2021-12-18 um 12 25 39

Bildschirmfoto 2021-12-18 um 12 25 51

@forehalo forehalo added the enhancement New feature or request label Dec 18, 2021
@sam3d
Copy link
Contributor

sam3d commented Dec 18, 2021

I've been able to fix this this (in rust-analyzer) by disabling proc attr macro support:

image

@numToStr
Copy link

With rust-analyzer 2022-01-10, you can also do the following to ignore the napi macro.

  • VSCode
"rust-analyzer.procMacro.ignored": { "napi-derive": ["napi"] }
  • Neovim
['rust-analyzer'] = {
    procMacro = {
        ignored = {
            ['napi-derive'] = { 'napi' },
        },
    },
},

@oyyd oyyd unpinned this issue Oct 21, 2022
@oyyd oyyd pinned this issue Oct 21, 2022
@oyyd
Copy link
Collaborator

oyyd commented Oct 21, 2022

Sorry for my mis-operation that unpin this issue..

junderw added a commit to mempool/mempool that referenced this issue Jun 26, 2023
See issue: napi-rs/napi-rs#944 (comment)
This will ignore expanding the napi macro for rust-analyzer, letting auto-complete
work inside the napi impl blocks.
junderw added a commit to mempool/mempool that referenced this issue Jun 26, 2023
See issue: napi-rs/napi-rs#944 (comment)
This will ignore expanding the napi macro for rust-analyzer, letting auto-complete
work inside the napi impl blocks.
mononaut pushed a commit to mempool/mempool that referenced this issue Jul 3, 2023
See issue: napi-rs/napi-rs#944 (comment)
This will ignore expanding the napi macro for rust-analyzer, letting auto-complete
work inside the napi impl blocks.
@BB-fat
Copy link

BB-fat commented Nov 30, 2023

@numToStr Do you know how to solve this problem in RustRover?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants
@mischnic @oyyd @forehalo @sam3d @numToStr @BB-fat and others