summaryrefslogtreecommitdiffstats
path: root/lua/plugins
diff options
context:
space:
mode:
authorNanderty <psopka@sopka.ch>2023-03-24 10:30:18 +0100
committerNanderty <psopka@sopka.ch>2023-03-24 10:30:18 +0100
commit02a1c77cad04e16005b8ab2ce18617b0ffa278b7 (patch)
treeda83611e9670f75a5fa4bf32292e7df36c59a505 /lua/plugins
parent7a69559ba4aaab151100a98e1345621c31026e46 (diff)
downloadneovim-config-02a1c77cad04e16005b8ab2ce18617b0ffa278b7.tar.gz
neovim-config-02a1c77cad04e16005b8ab2ce18617b0ffa278b7.tar.bz2
neovim-config-02a1c77cad04e16005b8ab2ce18617b0ffa278b7.zip
diagnostics and linting
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/general.lua16
-rw-r--r--lua/plugins/interface.lua1
-rw-r--r--lua/plugins/lsp.lua19
3 files changed, 35 insertions, 1 deletions
diff --git a/lua/plugins/general.lua b/lua/plugins/general.lua
index f86270d..ddcacea 100644
--- a/lua/plugins/general.lua
+++ b/lua/plugins/general.lua
@@ -1,5 +1,21 @@
return {
{
+ 'mfussenegger/nvim-lint',
+ event = {
+ 'BufWritePre'
+ },
+ config = function()
+ require('lint').linters_by_ft = {
+ tex = { 'lacheck', }
+ }
+ vim.api.nvim_create_autocmd({ "BufWritePost" }, {
+ callback = function()
+ require("lint").try_lint()
+ end,
+ })
+ end,
+ },
+ {
'tpope/vim-fugitive',
event = {
'BufReadPost',
diff --git a/lua/plugins/interface.lua b/lua/plugins/interface.lua
index 7e06d03..ede5cf8 100644
--- a/lua/plugins/interface.lua
+++ b/lua/plugins/interface.lua
@@ -41,7 +41,6 @@ return {
},
opts = {
show_current_context = true,
- show_current_context_start = true,
},
},
{
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua
index 68da19a..6ad37c3 100644
--- a/lua/plugins/lsp.lua
+++ b/lua/plugins/lsp.lua
@@ -33,6 +33,25 @@ return {
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
+ vim.diagnostic.config({
+ update_in_insert = true,
+ virtual_text = false,
+ })
+ vim.api.nvim_create_autocmd("CursorHold", {
+ buffer = bufnr,
+ callback = function()
+ local opts = {
+ header = '',
+ source = 'always',
+ border = {{' '},{' '},{' '},{' '}},
+ focusable = false,
+ close_events = { "BufLeave", "CursorMoved", "InsertEnter", },
+ prefix = ' ',
+ scope = 'cursor',
+ }
+ vim.diagnostic.open_float(nil, opts)
+ end
+ })
end,
},
}