Skip to content

Commit

Permalink
Don't format statement that breaks stylua.
Browse files Browse the repository at this point in the history
Also disable stylua-autoformatter for now, seems like that release may
cause malformed lua-code under specific circumstances (Comments in
statement).
  • Loading branch information
L3MON4D3 committed Jan 24, 2022
1 parent 2ebfa49 commit 59576a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: JohnnyMorganz/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: .
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Format with stylua"
branch: ${{ github.head_ref }}

- name: "Auto Generate docs"
uses: docker://leiserfg/md2vim
with:
Expand Down
12 changes: 8 additions & 4 deletions lua/luasnip/util/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,14 @@ local function insert_move_on(new_cur_pos)
count = new_cur_pos[1] - current_line
end

local try = -- move cursor to first column
"<Home>" .. -- move to correct line.
direction:rep(count) .. -- move to correct column
string.rep("<Right>", new_cur_pos[2])
-- stylua: ignore
local try =
-- move cursor to first column
"<Home>"
-- move to correct line.
.. direction:rep(count)
-- move to correct column
.. string.rep("<Right>", new_cur_pos[2])

local keys = vim.api.nvim_replace_termcodes(try, true, false, true)
-- passing only "n" doesn't open folds (:h feedkeys).
Expand Down

0 comments on commit 59576a5

Please sign in to comment.