Add a rule to install stylua and use the local one for other rules (#1307)

This commit is contained in:
Zhizhen He
2022-11-16 13:22:24 +08:00
committed by GitHub
parent e820335208
commit a188be8559
6 changed files with 42 additions and 58 deletions

View File

@@ -413,11 +413,7 @@ core.confirm = function(self, e, option, callback)
end)
else
vim.cmd([[silent! undojoin]])
vim.lsp.util.apply_text_edits(
e:get_completion_item().additionalTextEdits,
ctx.bufnr,
e.source:get_position_encoding_kind()
)
vim.lsp.util.apply_text_edits(e:get_completion_item().additionalTextEdits, ctx.bufnr, e.source:get_position_encoding_kind())
end
end)
feedkeys.call('', 'n', function()
@@ -453,13 +449,7 @@ core.confirm = function(self, e, option, callback)
local texts = vim.split(completion_item.textEdit.newText, '\n')
vim.api.nvim_win_set_cursor(0, {
completion_item.textEdit.range.start.line + #texts,
(
#texts == 1 and (
completion_item.textEdit.range.start.character + #texts[1]
) or (
#texts[#texts]
)
)
(#texts == 1 and (completion_item.textEdit.range.start.character + #texts[1]) or #texts[#texts]),
})
if is_snippet then
config.get().snippet.expand({