Skip to content

Commit

Permalink
Add semshi plugin for python
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalDevil committed Oct 12, 2023
1 parent 3b0a0cd commit d573a9a
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions lua/plugins/languages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,38 @@ return {
end,
event = "VeryLazy", -- Optional: needed only if you want to type `:VenvSelect` without a keymapping
},
-- numiras/semshi
-- Semantic Highlighting for Python in Neovim
{
"wookayin/semshi", -- use a maintained fork
ft = "python",
build = ":UpdateRemotePlugins",
init = function()
-- Disabled these features better provided by LSP or other more general plugins
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,
},

--------------------- Go ----------------------
-- go.nvim
Expand Down

0 comments on commit d573a9a

Please sign in to comment.