Skip to content

Commit

Permalink
refactor!: remove nvim-treesitter dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Oct 9, 2023
1 parent 1e67a50 commit 315d5d4
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 7 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Install with your favourite package manager alongside nvim-dap

```vim
call dein#add("nvim-lua/plenary.nvim")
call dein#add("nvim-treesitter/nvim-treesitter")
call dein#add("antoinemadec/FixCursorHold.nvim")
call dein#add("nvim-neotest/neotest")
```
Expand All @@ -54,7 +53,6 @@ call dein#add("nvim-neotest/neotest")

```vim
Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-treesitter/nvim-treesitter'
Plug 'antoinemadec/FixCursorHold.nvim'
Plug 'nvim-neotest/neotest'
```
Expand All @@ -66,7 +64,6 @@ use {
"nvim-neotest/neotest",
requires = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim"
}
}
Expand All @@ -79,7 +76,6 @@ use {
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
"antoinemadec/FixCursorHold.nvim"
}
}
Expand Down
1 change: 0 additions & 1 deletion lua/neotest/lib/subprocess.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function neotest.lib.subprocess.init()
{ parent_address }
)
-- Load dependencies
nio.fn.rpcrequest(child_chan, "nvim_exec_lua", "require('nvim-treesitter')", {})
nio.fn.rpcrequest(child_chan, "nvim_exec_lua", "require('plenary')", {})
enabled = true
nio.api.nvim_create_autocmd("VimLeavePre", { callback = cleanup })
Expand Down
2 changes: 1 addition & 1 deletion lua/neotest/lib/treesitter/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ end
function neotest.lib.treesitter.get_parse_root(file_path, content, opts)
local fast = opts.fast ~= false
local ft = lib.files.detect_filetype(file_path)
local lang = require("nvim-treesitter.parsers").ft_to_lang(ft)
local lang = vim.treesitter.language.get_lang(ft) or ft
nio.scheduler()
local lang_tree = vim.treesitter.get_string_parser(
content,
Expand Down
1 change: 0 additions & 1 deletion tests/minimal_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ vim.notify = print
vim.opt.rtp:append(".")
vim.opt.rtp:append(lazypath .. "/plenary.nvim")
vim.opt.rtp:append(lazypath .. "/nvim-dap")
vim.opt.rtp:append(lazypath .. "/nvim-treesitter")
vim.opt.swapfile = false
A = function(...)
print(vim.inspect(...))
Expand Down

0 comments on commit 315d5d4

Please sign in to comment.