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

This is not working for PHP language #4

Open
Bhavesh164 opened this issue Sep 13, 2022 · 5 comments
Open

This is not working for PHP language #4

Bhavesh164 opened this issue Sep 13, 2022 · 5 comments

Comments

@Bhavesh164
Copy link

Hello i have installed this plugin but this is not working for PHP language.
My neovim setup is
Neovim: 0.7

@David-Kunz
Copy link
Owner

David-Kunz commented Sep 13, 2022

Hi @Bhavesh164 ,

You probably need to add the correct query for PHP.

You can install the playground extension and check how those identifiers are called. Then you can add it to require'markid'.queries.

See also the video for more info.

Best regards,
David

@hectordommo
Copy link

I did declare the configuration as follow:


markid = {
        enable = true,
        queries = {
          default = '(identifier) @markid',
          javascript = [[
                  (identifier) @markid
                  (property_identifier) @markid
                  (shorthand_property_identifier_pattern) @markid
          ]],
          php = [[
            (variable_name) @markid
          ]]
        }
    }

Im very new to this stuff, im sure there must be a better way to declare it, but this is kind of working

@David-Kunz
Copy link
Owner

Thank you, @hectordommo !

Would this work for you, @Bhavesh164 ?

@hectordommo
Copy link

I should have, now is not working, as soon as I resolve it I will post the fix.

@hectordommo
Copy link

Just seeing i never posted an update. There's none. Current config is:

    local m = require('markid')
      markid = {
        enable = true,
        colors = m.colors.medium,
        queries = {
          default = '(identifier) @markid',
          tsserver = [[
          (identifier) @markid
          (property_identifier) @markid
          (shorthand_property_identifier_pattern) @markid
          ]],
          javascript = [[
          (identifier) @markid
          (property_identifier) @markid
          (shorthand_property_identifier_pattern) @markid
          ]],
          php = [[
          (variable_name) @markid
          ]]
        }
      },

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

No branches or pull requests

3 participants