neovim

Personal neovim configuration files
git clone git://gtms.dev/neovim
Log | Files | Refs

commit f4f409e38beb0ec4c06cd9e7e94fa997d15da71c
parent 95118f3896ae8bf7ccc4f9abe16f98319bb976a5
Author: Tomas Nemec <owl@gtms.dev>
Date:   Tue, 30 Apr 2024 00:31:10 +0200

update

Diffstat:
Mftplugin/html.lua | 3++-
Mplugin/diagflow.lua | 46++++++++++++++++++++++++----------------------
2 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/ftplugin/html.lua b/ftplugin/html.lua @@ -1 +1,2 @@ -require 'tms.lsp.dart'.start() +-- require 'tms.lsp.dart'.start() +vim.o.shiftwidth = 4 diff --git a/plugin/diagflow.lua b/plugin/diagflow.lua @@ -55,7 +55,8 @@ local function create_boxed_text(text_lines) max_length = math.max(max_length, #line) end - local top_border = border_chars.top_left .. string.rep(border_chars.horizontal, max_length) .. border_chars.top_right + local top_border = border_chars.top_left .. string.rep(border_chars.horizontal, max_length) .. border_chars + .top_right local bottom_border = border_chars.bottom_left .. string.rep(border_chars.horizontal, max_length) .. border_chars.bottom_right local boxed_lines = { top_border } @@ -145,7 +146,8 @@ local function reload() end local cursor_lnum = vim.api.nvim_win_get_cursor(0)[1] - 1 - local diagnostics = vim.diagnostic.get(0, { lnum = cursor_lnum }) + local diagnostics = vim.diagnostic.get(0, { + lnum = cursor_lnum }) render(diagnostics) end @@ -159,26 +161,26 @@ local function toggle(force) end end -vim.api.nvim_create_autocmd('InsertEnter', { - callback = function() - toggle(false) - end, -}) -vim.api.nvim_create_autocmd('InsertLeave', { - callback = function() - toggle(true) - end, -}) -vim.api.nvim_create_autocmd({ 'DiagnosticChanged', 'CursorMoved', 'CursorMovedI', 'WinScrolled' }, { - callback = function() - reload() - end, -}) -vim.api.nvim_create_autocmd({ 'BufLeave' }, { - callback = function() - clear() - end, -}) +-- vim.api.nvim_create_autocmd('InsertEnter', { +-- callback = function() +-- toggle(false) +-- end, +-- }) +-- vim.api.nvim_create_autocmd('InsertLeave', { +-- callback = function() +-- toggle(true) +-- end, +-- }) +-- vim.api.nvim_create_autocmd({ 'DiagnosticChanged', 'CursorMoved', 'CursorMovedI', 'WinScrolled' }, { +-- callback = function() +-- reload() +-- end, +-- }) +-- vim.api.nvim_create_autocmd({ 'BufLeave' }, { +-- callback = function() +-- clear() +-- end, +-- }) vim.api.nvim_create_user_command('Diagflow', function() toggle()