Skip to content

Commit

Permalink
Fix semshi plugin autocmd errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalDevil committed Oct 14, 2023
1 parent dec2a38 commit baeff4b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
20 changes: 0 additions & 20 deletions lua/configs/core/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ local augroup = vim.api.nvim_create_augroup
local commonAutoGroup = augroup("commonAutoGroup", { clear = true })
local indentAutoGroup = augroup("indentAutoGroup", { clear = true })
local writeAutoGroup = augroup("writeAutoGroup", { clear = true })
local SemanticHighlight = augroup("SemanticHighlight", { clear = true })

local lispFiletypes = { "clj", "*.el", "*.fnl", "*.hy", "*.janet", "*.lisp", "*.rkt", "*.scm" }

Expand Down Expand Up @@ -77,22 +76,3 @@ autocmd("BufNewFile", {
})
end,
})

-- Set python semshi colors
-- This autocmd must be defined in init to take effect
vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, {
group = SemanticHighlight,
callback = function()
-- Only add style, inherit or link to the LSP's colors
vim.cmd([[
highlight! semshiGlobal gui=italic
highlight! semshiImported gui=bold
highlight! link semshiParameter @lsp.type.parameter
highlight! link semshiParameterUnused DiagnosticUnnecessary
highlight! link semshiBuiltin @function.builtin
highlight! link semshiAttribute @attribute
highlight! link semshiSelf @lsp.type.selfKeyword
highlight! link semshiUnresolved @lsp.type.unresolvedReference
]])
end,
})
19 changes: 18 additions & 1 deletion lua/plugins/languages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,24 @@ return {
vim.g["semshi#error_sign"] = false
vim.g["semshi#simplify_markup"] = false
vim.g["semshi#mark_selected_nodes"] = false
vim.g["semshi#update_delay_factor"] = 0.001

-- This autocmd must be defined in init to take effect
vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, {
group = vim.api.nvim_create_augroup("SemanticHighlight", {}),
callback = function()
-- Only add style, inherit or link to the LSP's colors
vim.cmd([[
highlight! semshiGlobal gui=italic
highlight! semshiImported gui=bold
highlight! link semshiParameter @lsp.type.parameter
highlight! link semshiParameterUnused DiagnosticUnnecessary
highlight! link semshiBuiltin @function.builtin
highlight! link semshiAttribute @attribute
highlight! link semshiSelf @lsp.type.selfKeyword
highlight! link semshiUnresolved @lsp.type.unresolvedReference
]])
end,
})
end,
},

Expand Down

0 comments on commit baeff4b

Please sign in to comment.