Skip to content

Commit

Permalink
refactor: remove redundant treesitter parser init
Browse files Browse the repository at this point in the history
The treesitter parser initialization for markdown was redundant since the
buffer's syntax is already set to markdown via vim.bo[bufnr].syntax.
  • Loading branch information
deathbeam committed Nov 20, 2024
1 parent d32648a commit 5ff64d0
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lua/CopilotChat/chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ local Chat = class(function(self, help, on_buf_create)
vim.bo[bufnr].filetype = self.name
vim.bo[bufnr].syntax = 'markdown'
vim.bo[bufnr].textwidth = 0
local ok, parser = pcall(vim.treesitter.get_parser, bufnr, 'markdown')
if ok and parser then
vim.treesitter.start(bufnr, 'markdown')
end

if not self.spinner then
self.spinner = Spinner(bufnr)
Expand Down

0 comments on commit 5ff64d0

Please sign in to comment.