Skip to content

Commit

Permalink
refactor(parsing): register please tree-sitter parser in parser inste…
Browse files Browse the repository at this point in the history
…ad of plugin
  • Loading branch information
marcuscaisey committed May 5, 2024
1 parent 2e581c8 commit 0645bf6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions lua/please/parsing.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ local logging = require('please.logging')
local cursor = require('please.cursor')
local future = require('please.future')

future.vim.treesitter.language.register('python', 'please')

local parsing = {}

---Checks if the parser for the given filetype is installed and if not prompts the user to install it.
Expand Down
5 changes: 0 additions & 5 deletions lua/please/plugin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,8 @@ local function create_user_command()
command.create_user_command(cmds, cmd_name_to_opts)
end

local function configure_treesitter()
future.vim.treesitter.language.register('python', 'please')
end

function M.load()
configure_filetype()
configure_treesitter()
create_user_command()
debug.setup()
end
Expand Down
1 change: 1 addition & 0 deletions tests/please/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ neovim_test(
deps = [
"//lua/please:cursor",
"//lua/please:parsing",
"//lua/please/future",
"//tests/utils:temptree",
],
)
Expand Down

0 comments on commit 0645bf6

Please sign in to comment.