markid icon indicating copy to clipboard operation
markid copied to clipboard

This is not working for PHP language

Open Bhavesh164 opened this issue 3 years ago • 5 comments

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

Bhavesh164 avatar Sep 13 '22 05:09 Bhavesh164

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

David-Kunz avatar Sep 13 '22 07:09 David-Kunz

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

hectordommo avatar Jan 12 '23 03:01 hectordommo

Thank you, @hectordommo !

Would this work for you, @Bhavesh164 ?

David-Kunz avatar Jan 16 '23 13:01 David-Kunz

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

hectordommo avatar Apr 18 '23 04:04 hectordommo

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
          ]]
        }
      },

hectordommo avatar Jul 04 '24 02:07 hectordommo