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

Treesitter Parsing (again) #193

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

treywood
Copy link
Contributor

@treywood treywood commented Aug 27, 2024

follow up to #181

  • make run_all work with treesitter
  • fix graphql requests
  • general cleanup

what doesn't work (yet):

  • redirecting response bodies to a file, since the >> and >>! operators aren't part of the http grammar. I opened a pull request to add this to the grammar, and have it implemented in my kulala fork in a separate branch

@@ -15,7 +15,7 @@ M.get_contents = function()
end
if req.body ~= nil then
table.insert(contents, "")
local body_as_table = vim.split(req.body, "\r\n")
local body_as_table = vim.split(req.body, "\r?\n")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

text as parsed by tree-sitter doesn't include carriage returns. i tested this change with the tree-sitter option disabled as well

@gorillamoe gorillamoe added the enhancement New feature or request label Aug 30, 2024
@gorillamoe
Copy link
Member

Thanks for your hard work ❤️ 💪

@gorillamoe gorillamoe merged commit c82d3f6 into mistweaverco:main Aug 30, 2024
@gorillamoe
Copy link
Member

I'm getting errors on startup occasionally, saying no http ts parser avail.

Failed to run `config` for kulala.nvim

...h/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:107: no parser for 'http' language, see :help treesitter-parsers

# stacktrace:
  - /tmp/.mount_nvimYl6d8h/usr/share/nvim/runtime/lua/vim/treesitter/language.lua:107 _in_ **add**
  - /tmp/.mount_nvimYl6d8h/usr/share/nvim/runtime/lua/vim/treesitter/query.lua:250 _in_ **fn**
  - /tmp/.mount_nvimYl6d8h/usr/share/nvim/runtime/lua/vim/func/_memoize.lua:58 _in_ **parse**
  - lua/kulala/parser/treesitter.lua:8
  - lua/kulala/parser/init.lua:11
  - lua/kulala/ui/init.lua:6
  - lua/kulala/init.lua:1
  - /lualine.nvim/lua/lualine/utils/loader.lua:26 _in_ **mod**
  - /lualine.nvim/lua/lualine/utils/loader.lua:79 _in_ **component_loader**
  - /lualine.nvim/lua/lualine/utils/loader.lua:148 _in_ **load_sections**
  - /lualine.nvim/lua/lualine/utils/loader.lua:159 _in_ **load_components**
  - /lualine.nvim/lua/lualine/utils/loader.lua:204 _in_ **load_all**
  - /lualine.nvim/lua/lualine.lua:636 _in_ **setup**
  - ~/.config/nvim/lua/plugins/config/lualine-nvim.lua:47 _in_ **config**
  - ~/.config/nvim/lua/plugins/init.lua:16
  - ~/projects/personal/neovimfiles/nvim/init.lua:1

@gorillamoe
Copy link
Member

I think this is fixed in 6c4ab0c

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

Successfully merging this pull request may close these issues.

2 participants