Skip to content

Commit

Permalink
added gsub to resolve code-biscuits#27
Browse files Browse the repository at this point in the history
  • Loading branch information
axieax committed Nov 11, 2021
1 parent afc9c79 commit a1872b9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lua/nvim-biscuits/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ nvim_biscuits.BufferAttach = function(bufnr)

attached_buffers[bufnr] = true

local lang = ts_parsers.get_buf_lang(bufnr)
local lang = ts_parsers.get_buf_lang(bufnr):gsub("-", "")

local toggle_keybind = config.get_language_config(final_config, lang,
"toggle_keybind")
Expand All @@ -172,10 +172,8 @@ nvim_biscuits.BufferAttach = function(bufnr)

local on_lines = function() nvim_biscuits.decorate_nodes(bufnr, lang) end

if not lang:find("-") then
vim.cmd("highlight default link " .. make_biscuit_hl_group_name(lang) ..
" BiscuitColor")
end
vim.cmd("highlight default link " .. make_biscuit_hl_group_name(lang) ..
" BiscuitColor")

-- we need to fire once at the very start if config allows
if toggle_keybind ~= nil and
Expand Down

0 comments on commit a1872b9

Please sign in to comment.