summaryrefslogtreecommitdiffstats
path: root/.config/nvim
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim')
-rwxr-xr-x.config/nvim/after/ftplugin/mail.lua3
-rwxr-xr-x.config/nvim/lua/plugins/indent-o-matic.lua2
-rwxr-xr-x.config/nvim/lua/plugins/init.lua5
-rwxr-xr-x.config/nvim/lua/plugins/lspconfig.lua14
-rwxr-xr-x.config/nvim/lua/plugins/null-ls.lua1
-rwxr-xr-x.config/nvim/queries/python/highlights.scm12
6 files changed, 29 insertions, 8 deletions
diff --git a/.config/nvim/after/ftplugin/mail.lua b/.config/nvim/after/ftplugin/mail.lua
index 7946291..a4bf6cc 100755
--- a/.config/nvim/after/ftplugin/mail.lua
+++ b/.config/nvim/after/ftplugin/mail.lua
@@ -1,4 +1,5 @@
o.colorcolumn = '72'
bo.textwidth = 72
-bo.formatoptions = 'watqc'
+-- bo.formatoptions = 'watqc' --
+bo.formatoptions = 'atcql'
bo.smartindent = false
diff --git a/.config/nvim/lua/plugins/indent-o-matic.lua b/.config/nvim/lua/plugins/indent-o-matic.lua
index 517c3d8..d64f68c 100755
--- a/.config/nvim/lua/plugins/indent-o-matic.lua
+++ b/.config/nvim/lua/plugins/indent-o-matic.lua
@@ -15,5 +15,5 @@ require('indent-o-matic').setup {
filetype_django = { max_lines = 4096 },
filetype_toml = { max_lines = 4096 },
filetype_yaml = { max_lines = 4096 },
- filetype_jsonnet = { max_lines = 4096 },
+ filetype_proto = { max_lines = 4096 },
}
diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua
index 9878222..1019549 100755
--- a/.config/nvim/lua/plugins/init.lua
+++ b/.config/nvim/lua/plugins/init.lua
@@ -31,11 +31,12 @@ require('paq') {
vim.fn.system({'python3', '-m', 'pipx', 'inject', 'python-lsp-server', 'git+https://github.com/python/mypy'})
vim.fn.system({'python3', '-m', 'pipx', 'inject', 'python-lsp-server', 'pylsp-mypy'})
vim.fn.system({'python3', '-m', 'pipx', 'inject', 'python-lsp-server', 'types-all'})
+ vim.fn.system({'python3', '-m', 'pipx', 'inject', 'python-lsp-server', 'flake8'})
vim.fn.system({'python3', '-m', 'pipx', 'upgrade', '--include-injected', 'python-lsp-server'})
-- vim.fn.system({'python3', '-m', 'pip', 'install', '--force', 'debugpy'})
end
};
- -- {'mickael-menu/zk-nvim'};
+ {'mickael-menu/zk-nvim'};
{
'jose-elias-alvarez/null-ls.nvim',
run = function()
@@ -100,4 +101,4 @@ require('plugins.null-ls')
require('plugins.telescope')
require('plugins.treesitter')
require('plugins.which-key')
--- require('plugins.zk')
+require('plugins.zk')
diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua
index 6d37467..14b001e 100755
--- a/.config/nvim/lua/plugins/lspconfig.lua
+++ b/.config/nvim/lua/plugins/lspconfig.lua
@@ -30,7 +30,7 @@ vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', op
vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
-- require('lspconfig').ansiblels.setup{ on_attach = on_attach }
-require('lspconfig').clangd.setup{ on_attach = on_attach }
+require('lspconfig').clangd.setup{ on_attach = on_attach, filetypes = { "c", "cpp", "objc", "objcpp", "cuda" } }
require('lspconfig').eslint.setup{ on_attach = on_attach }
require('lspconfig').gopls.setup{ on_attach = on_attach }
require('lspconfig').terraformls.setup{ on_attach = on_attach }
@@ -62,16 +62,24 @@ require('lspconfig').pylsp.setup{
},
plugins = {
flake8 = {
+ -- enabled = vim.fn.executable('flake8') == 1,
enabled = true,
ignore = {},
- maxLineLength = 160
+ maxLineLength = 160,
+ cmd = 'flake8',
},
rope_completion = {
enabled = true,
},
pyflakes = {
- enabled = true
+ enabled = true,
},
+ pylsp_mypy = {
+ overrides = {
+ '--show-error-codes',
+ true
+ },
+ }
}
}
}
diff --git a/.config/nvim/lua/plugins/null-ls.lua b/.config/nvim/lua/plugins/null-ls.lua
index 3f84b26..d023193 100755
--- a/.config/nvim/lua/plugins/null-ls.lua
+++ b/.config/nvim/lua/plugins/null-ls.lua
@@ -2,6 +2,7 @@ require('null-ls').setup({
sources = {
-- require('null-ls').builtins.diagnostics.ansiblelint,
-- require('null-ls').builtins.diagnostics.markdownlint,
+ require('null-ls').builtins.diagnostics.buf,
require('null-ls').builtins.diagnostics.eslint,
require('null-ls').builtins.diagnostics.gitlint,
require('null-ls').builtins.diagnostics.luacheck,
diff --git a/.config/nvim/queries/python/highlights.scm b/.config/nvim/queries/python/highlights.scm
index 2ea4847..a2179ec 100755
--- a/.config/nvim/queries/python/highlights.scm
+++ b/.config/nvim/queries/python/highlights.scm
@@ -1,5 +1,15 @@
; extends
-(block (expression_statement (string)) @docstring)
+; function and class docstring detection
+(block
+ (expression_statement
+ (string)) @docstring)
+; shpinx detection in docstring
+; (block
+; (expression_statement
+; (string
+; (string_content))) @type)
+
+; type hint detection
(type) @type
remember that computers suck.