diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-10-04 16:27:55 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2023-10-04 16:27:55 +0200 |
| commit | 60e517c96db9fc7c2bedbf04905f16cd253bf4ef (patch) | |
| tree | 47213c867980760e398a52a2405d0ff4d9f01e41 /lua | |
| parent | d05e91141c5f3075825017befe5001acb7ad8edc (diff) | |
Use the plugin dir
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/tree-sitter-api-notation.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/tree-sitter-api-notation.lua b/lua/tree-sitter-api-notation.lua index 223958a..184cb57 100644 --- a/lua/tree-sitter-api-notation.lua +++ b/lua/tree-sitter-api-notation.lua @@ -2,10 +2,12 @@ local M = {} function M.setup() + local config_file_path = debug.getinfo(1).source:sub(2) + local plugin_dir = vim.fn.fnamemodify(config_file_path, ':h:h') local parser_config = require 'nvim-treesitter.parsers'.get_parser_configs() parser_config.api_notation = { install_info = { - url = vim.fn.expand('%:p:h:h'), + url = plugin_dir, files = {'src/parser.c'}, branch = 'main' } |