Skip to content

Commit

Permalink
add func buffer_is_listed
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Aug 7, 2023
1 parent c1d2d14 commit 949c80d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lua/LspUI/lib/util.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
local api = vim.api
local api, fn = vim.api, vim.fn
local M = {}

local version = "v2-undefined"
Expand All @@ -18,6 +18,13 @@ M.disable_move_keys = function(buffer_id)
end
end

-- check buffer is listed ?
--- @param buffer_id integer
--- @return boolean
M.buffer_is_listed = function(buffer_id)
return fn.buflisted(buffer_id) == 1
end

-- generate command description
--- @param desc string
M.command_desc = function(desc)
Expand Down

0 comments on commit 949c80d

Please sign in to comment.