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

View file

@ -8,7 +8,6 @@ function init()
"Yellow", "Yellow",
"Red", "Red",
} }
local hooks = require "ibl.hooks" local hooks = require "ibl.hooks"
-- create the highlight groups in the highlight setup hook, so they are reset -- create the highlight groups in the highlight setup hook, so they are reset
-- every time the colorscheme changes -- every time the colorscheme changes
@ -22,7 +21,10 @@ function init()
vim.api.nvim_set_hl(0, "Cyan", { fg = "#56B6C2" }) vim.api.nvim_set_hl(0, "Cyan", { fg = "#56B6C2" })
end) 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 end
return { return {

View file

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