1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-16 11:24:55 +02:00

linting fixes

This commit is contained in:
Henrik Hautakoski 2024-06-08 17:00:15 +02:00
parent 6ae28327e0
commit b2892fa855
5 changed files with 24 additions and 7 deletions

View file

@ -161,6 +161,7 @@ return {
local end_line = vim.api.nvim_buf_get_lines(0, args.line2 - 1, args.line2, true)[1]
range = {
start = { args.line1, 0 },
---@diagnostic disable-next-line: undefined-field
["end"] = { args.line2, end_line:len() },
}
end

View file

@ -1,5 +1,7 @@
-- Helper functions for dealing with buffers
local M = {}
-- Close all but current buffer
function M.CloseOthers()
for _, i in ipairs(vim.api.nvim_list_bufs()) do
if i ~= vim.api.nvim_get_current_buf() then
@ -8,6 +10,7 @@ function M.CloseOthers()
end
end
-- Close all open buffers
function M.CloseAll()
for _, i in ipairs(vim.api.nvim_list_bufs()) do
vim.api.nvim_buf_delete(i, {})