mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
python: lsp_auto_brackets to set if brackets will be added
This commit is contained in:
parent
97480dc5d2
commit
74a874781b
1 changed files with 6 additions and 2 deletions
|
|
@ -2,9 +2,11 @@ if lazyvim_docs then
|
|||
-- LSP Server to use for Python.
|
||||
-- Set to "basedpyright" to use basedpyright instead of pyright.
|
||||
vim.g.lazyvim_python_lsp = "pyright"
|
||||
vim.g.lazyvim_python_lsp_auto_brackets = true
|
||||
end
|
||||
|
||||
local lsp = vim.g.lazyvim_python_lsp or "pyright"
|
||||
local lsp_brackets = vim.g.lazyvim_python_lsp_auto_brackets == nil and true or false
|
||||
|
||||
return {
|
||||
{
|
||||
|
|
@ -111,8 +113,10 @@ return {
|
|||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
opts = function(_, opts)
|
||||
opts.auto_brackets = opts.auto_brackets or {}
|
||||
table.insert(opts.auto_brackets, "python")
|
||||
if lsp_brackets then
|
||||
opts.auto_brackets = opts.auto_brackets or {}
|
||||
table.insert(opts.auto_brackets, "python")
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue