Skip to content

Commit

Permalink
Suggested style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ner0-m committed Dec 9, 2021
1 parent 70aa323 commit f813c0a
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lua/luasnip/extras/filetype_functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ local function from_cursor_pos()
end
end

local from_filetype = function()
local function from_filetype()
return vim.split(vim.bo.filetype, ".", true)
end

local from_pos_or_filetype = function()
local from_cursor = from_cursor_pos()
if not vim.tbl_isempty(from_cursor) then
return from_cursor
else
return from_filetype()
end
local function from_pos_or_filetype()
local from_cursor = from_cursor_pos()
if not vim.tbl_isempty(from_cursor) then
return from_cursor
else
return from_filetype()
end
end

return {
from_filetype = from_filetype,
from_cursor_pos = from_cursor_pos,
from_pos_or_filetype = from_pos_or_filetype,
from_pos_or_filetype = from_pos_or_filetype,
}

0 comments on commit f813c0a

Please sign in to comment.