Skip to content

Commit

Permalink
fix: Fix stylua errors and install_stylua script (#923)
Browse files Browse the repository at this point in the history
- Fix code style issues, suggested by stylua
- Update install_stylua.lua script so that it can run in macOS as well.
  • Loading branch information
wookayin authored Apr 20, 2022
1 parent f9f6d8d commit f51dc68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
12 changes: 6 additions & 6 deletions lua/cmp/config/mapping.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
local types = require('cmp.types')
local misc = require('cmp.utils.misc')
local feedkeys = require('cmp.utils.feedkeys')
local keymap = require('cmp.utils.keymap')
local keymap = require('cmp.utils.keymap')

local mapping = setmetatable({}, {
__call = function(_, invoke, modes)
Expand Down Expand Up @@ -39,7 +39,7 @@ mapping.preset.insert = function(override)
},
['<C-e>'] = {
i = mapping.abort(),
}
},
})
end

Expand All @@ -54,7 +54,7 @@ mapping.preset.cmdline = function(override)
else
feedkeys.call(keymap.t('<C-z>'), 'n')
end
end
end,
},
['<S-Tab>'] = {
c = function()
Expand All @@ -64,7 +64,7 @@ mapping.preset.cmdline = function(override)
else
feedkeys.call(keymap.t('<C-z>'), 'n')
end
end
end,
},
['<C-n>'] = {
c = function(fallback)
Expand All @@ -74,7 +74,7 @@ mapping.preset.cmdline = function(override)
else
fallback()
end
end
end,
},
['<C-p>'] = {
c = function(fallback)
Expand All @@ -84,7 +84,7 @@ mapping.preset.cmdline = function(override)
else
fallback()
end
end
end,
},
['<C-e>'] = {
c = mapping.close(),
Expand Down
1 change: 0 additions & 1 deletion lua/cmp/utils/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,3 @@ misc.redraw = setmetatable({
})

return misc

3 changes: 1 addition & 2 deletions utils/install_stylua.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ set -eu pipefall

declare -r INSTALL_DIR="$PWD/utils"
declare -r RELEASE="0.10.0"
declare -r OS="linux"
# declare -r OS="$(uname -s)"
declare -r OS=$([ "$(uname -s)" == "Darwin" ] && echo "macos" || echo "linux")
declare -r FILENAME="stylua-$RELEASE-$OS"

declare -a __deps=("curl" "unzip")
Expand Down

0 comments on commit f51dc68

Please sign in to comment.