diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-07-03 14:45:08 -0700 |
|---|---|---|
| committer | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-07-03 15:49:27 -0700 |
| commit | ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c (patch) | |
| tree | 77d533dc9606ca7e9b30d1a96baebf3de325d2a8 /lua/lspconfig/_lspui.lua | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.gz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.bz2 nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.lz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.xz nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.tar.zst nvim-lspconfig-ec11b85df73cce4edb2925cb7f1d0e8db3a07b1c.zip | |
ci: lint and format with stylua
Diffstat (limited to 'lua/lspconfig/_lspui.lua')
| -rw-r--r-- | lua/lspconfig/_lspui.lua | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lua/lspconfig/_lspui.lua b/lua/lspconfig/_lspui.lua index ba465221..a79b9293 100644 --- a/lua/lspconfig/_lspui.lua +++ b/lua/lspconfig/_lspui.lua @@ -34,12 +34,12 @@ function win_float.default_opts(options) local left = math.floor((vim.o.columns - width) / 2) local opts = { - relative = 'editor', - row = top, - col = left, - width = width, - height = height, - style = 'minimal' + relative = "editor", + row = top, + col = left, + width = width, + height = height, + style = "minimal", } return opts @@ -60,12 +60,12 @@ function win_float.percentage_range_window(col_range, row_range, options) win_opts.relative = "editor" local height_percentage, row_start_percentage - if type(row_range) == 'number' then + if type(row_range) == "number" then assert(row_range <= 1) assert(row_range > 0) height_percentage = row_range row_start_percentage = (1 - height_percentage) / 2 - elseif type(row_range) == 'table' then + elseif type(row_range) == "table" then height_percentage = row_range[2] - row_range[1] row_start_percentage = row_range[1] else @@ -73,15 +73,15 @@ function win_float.percentage_range_window(col_range, row_range, options) end win_opts.height = math.ceil(vim.o.lines * height_percentage) - win_opts.row = math.ceil(vim.o.lines * row_start_percentage) + win_opts.row = math.ceil(vim.o.lines * row_start_percentage) local width_percentage, col_start_percentage - if type(col_range) == 'number' then + if type(col_range) == "number" then assert(col_range <= 1) assert(col_range > 0) width_percentage = col_range col_start_percentage = (1 - width_percentage) / 2 - elseif type(col_range) == 'table' then + elseif type(col_range) == "table" then width_percentage = col_range[2] - col_range[1] col_start_percentage = col_range[1] else @@ -91,21 +91,21 @@ function win_float.percentage_range_window(col_range, row_range, options) win_opts.col = math.floor(vim.o.columns * col_start_percentage) win_opts.width = math.floor(vim.o.columns * width_percentage) win_opts.border = { - {" ", "NormalFloat"}, - {" ", "NormalFloat"}, - {" ", "NormalFloat"}, - {" ", "NormalFloat"}, - {" ", "NormalFloat"}, - {" ", "NormalFloat"}, - {" ", "NormalFloat"}, - {" ", "NormalFloat"} + { " ", "NormalFloat" }, + { " ", "NormalFloat" }, + { " ", "NormalFloat" }, + { " ", "NormalFloat" }, + { " ", "NormalFloat" }, + { " ", "NormalFloat" }, + { " ", "NormalFloat" }, + { " ", "NormalFloat" }, } local bufnr = options.bufnr or vim.api.nvim_create_buf(false, true) local win_id = vim.api.nvim_open_win(bufnr, true, win_opts) vim.api.nvim_win_set_buf(win_id, bufnr) - vim.cmd('setlocal nocursorcolumn') + vim.cmd "setlocal nocursorcolumn" return { bufnr = bufnr, |
