update indent highlight, fix python lsp setup

This commit is contained in:
Maciej Lebiest 2023-11-23 22:00:35 +01:00
parent 5046d62fcc
commit bf1f88b7a4
3 changed files with 24 additions and 14 deletions

View file

@ -45,7 +45,6 @@ ENV MASON_PKGS=" \
phpstan \
pyright \
python-lsp-server \
ruff-lsp \
sqlls \
typescript-language-server \
yaml-language-server \
@ -62,6 +61,7 @@ COPY . /root/.config/nvim
RUN dnf install -y \
${GENERAL_PKGS} ${NEOVIM_PKGS} ${PYTHON_DEVEL_PKGS} ${R_DEVEL_PKGS} ${RUBY_DEVEL_PKGS} && \
R -e 'install.packages("languageserver", repos = "http://cran.us.r-project.org")' && \
dnf -y autoremove && \
dnf clean all && \
pip install ${PIP_PKGS}

View file

@ -8,7 +8,6 @@ function init()
"Yellow",
"Red",
}
local hooks = require "ibl.hooks"
-- create the highlight groups in the highlight setup hook, so they are reset
-- every time the colorscheme changes
@ -22,7 +21,10 @@ function init()
vim.api.nvim_set_hl(0, "Cyan", { fg = "#56B6C2" })
end)
require("ibl").setup { indent = { highlight = highlight } }
vim.g.rainbow_delimiters = { highlight = highlight }
require("ibl").setup { scope = { highlight = highlight } }
hooks.register(hooks.type.SCOPE_HIGHLIGHT, hooks.builtin.scope_highlight_from_extmark)
end
return {

View file

@ -47,8 +47,11 @@ return {
, settings = {
pylsp = {
plugins = {
rope_autoimport = { enabled = false, memory = true },
rope_completion = { enabled = false, eager = true },
rope_autoimport = { enabled = true, memory = true },
rope_completion = { enabled = true, eager = false },
rope = {
ropeFolder = nil
},
jedi_completion = {
enabled = true,
include_params = true,
@ -62,7 +65,7 @@ return {
jedi_references = { enabled = true },
jedi_signature_help = { enabled = true },
jedi_symbols = { enabled = true },
--ruff = { enabled = true },
ruff = { enabled = false },
flake8 = {
enabled = false -- ruff_lsp
},
@ -71,7 +74,9 @@ return {
args = {
-- disable missing module docstring info
-- and temporarilt false cannot import errors
'--disable=C0114,E0401'
-- too few public methods
-- missing functon or method doc
'--disable=C0114,E0401,R0903,C0116'
}
},
yapf = {
@ -80,14 +85,17 @@ return {
autopep8 = {
enabled = false
},
pyflakes = { enabled = false }, -- ruff_lsp
pyodestyle = { enabled = false }, -- ruff_lsp
pyflakes = { enabled = true }, -- ruff_lsp
pycodestyle = { enabled = false }, -- ruff_lsp
pydocstyle = {
enabled = true,
ignore = {
'D100', -- disable missing module docstring info
'D101', -- disable missing public class doc
'D102', -- disable missing class method doc
'D103', -- disable missing function doc
'D203', -- disable one line before class docstring required
'D213' -- disable multiline docstring summary
'D213', -- disable multiline docstring summary
-- should start at the second line
}
},
@ -95,10 +103,10 @@ return {
}
}
}
require 'lspconfig'.ruff_lsp.setup {
on_attach = on_attach,
capabilities = capabilities,
}
--require 'lspconfig'.ruff_lsp.setup {
--on_attach = on_attach,
--capabilities = capabilities,
--}
require 'lspconfig'.pyright.setup {
on_attach = on_attach,
capabilities = capabilities,