Skip to content

Commit

Permalink
chore: venv-select & semshi to optional, suggested plugins (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgrieser committed Jul 20, 2024
1 parent 65d240f commit 7517c15
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 50 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ requires `pynvim` (`python3 -m pip install pynvim`) to be installed.
Both provide better highlighting, treesitter is considered the more "modern"
approach. Treesitter covers some cases semshi does not and vice versa. Have a
[look at the comparison](./treesitter-or-semshi.md) to decide for yourself which
one to use. (You can use both, of course.)
one to use. The config uses treesitter as the more modern approach.

## Additional plugins of interest
These plugins are not included in the config, but they are worth mentioning, as
Expand All @@ -101,6 +101,8 @@ some people might be interested in them:
- [jupytext.nvim](https://github.com/GCBallesteros/jupytext.nvim): Convert
Jupyter Notebooks to code and back.
- [py-requirements.nvim](https://github.com/MeanderingProgrammer/py-requirements.nvim): : Helps manage python requirements.
- [venv-selector](https://github.com/linux-cultist/venv-selector.nvim): switch
virtual environments

## Recommended Citation
You can cite this software project as:
Expand Down
50 changes: 1 addition & 49 deletions kickstart-python.lua
Original file line number Diff line number Diff line change
Expand Up @@ -253,40 +253,7 @@ local plugins = {
},
},

-- semshi for additional syntax highlighting.
-- See the README for Treesitter cs Semshi comparison.
-- requires `pynvim` (`python3 -m pip install pynvim`)
{
"wookayin/semshi", -- maintained fork
ft = "python",
build = ":UpdateRemotePlugins", -- don't disable `rplugin` in lazy.nvim for this
init = function()
vim.g.python3_host_prog = vim.fn.exepath("python3")
-- better done by LSP
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

vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, {
callback = function()
vim.cmd([[
highlight! semshiGlobal gui=italic
highlight! link semshiImported @lsp.type.namespace
highlight! link semshiParameter @lsp.type.parameter
highlight! link semshiParameterUnused DiagnosticUnnecessary
highlight! link semshiBuiltin @function.builtin
highlight! link semshiAttribute @field
highlight! link semshiSelf @lsp.type.selfKeyword
highlight! link semshiUnresolved @lsp.type.unresolvedReference
highlight! link semshiFree @comment
]])
end,
})
end,
},

-- Colorscheme
-- COLORSCHEME
-- In neovim, the choice of color schemes is unfortunately not purely
-- aesthetic – treesitter-based highlighting or newer features like semantic
-- highlighting are not always supported by a color scheme. It's therefore
Expand Down Expand Up @@ -391,21 +358,6 @@ local plugins = {
"chrisgrieser/nvim-puppeteer",
dependencies = "nvim-treesitter/nvim-treesitter",
},

-- select virtual environments
-- - makes pyright and debugpy aware of the selected virtual environment
-- - Select a virtual environment with `:VenvSelect`
{
"linux-cultist/venv-selector.nvim",
dependencies = {
"neovim/nvim-lspconfig",
"nvim-telescope/telescope.nvim",
"mfussenegger/nvim-dap-python",
},
opts = {
dap_enabled = true, -- makes the debugger work with venv
},
},
}

--------------------------------------------------------------------------------
Expand Down

0 comments on commit 7517c15

Please sign in to comment.