removed workarounds for old vim version
This commit is contained in:
parent
4bbf17633d
commit
f9d34430ae
@ -1,23 +1,4 @@
|
||||
if vim.version().minor >= 8 then
|
||||
local function status_line()
|
||||
local file_name = "%-.32t"
|
||||
local modified = " %-m"
|
||||
local right_align = "%="
|
||||
local line_no = "%10([%l/%L%)]"
|
||||
local pct_thru_file = "%5p%%"
|
||||
|
||||
return string.format(
|
||||
"%s%s%s%s%s",
|
||||
file_name,
|
||||
modified,
|
||||
right_align,
|
||||
line_no,
|
||||
pct_thru_file
|
||||
)
|
||||
end
|
||||
|
||||
vim.opt.laststatus = 3
|
||||
-- vim.opt.winbar = status_line()
|
||||
require('lualine').setup({
|
||||
options = { theme = 'gruvbox' },
|
||||
sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } },
|
||||
@ -40,11 +21,3 @@ if vim.version().minor >= 8 then
|
||||
lualine_z = {}
|
||||
},
|
||||
})
|
||||
else
|
||||
require('lualine').setup({
|
||||
options = { theme = 'gruvbox' },
|
||||
sections = { lualine_c = { 'filename' } },
|
||||
globalstatus = false,
|
||||
-- inactive_sections = { lualine_c = { 'filename' } },
|
||||
})
|
||||
end
|
||||
|
@ -63,19 +63,11 @@ local on_attach = function(client, bufnr)
|
||||
|
||||
-- Set some keybinds conditional on server capabilities
|
||||
if client.server_capabilities.documentFormattingProvider then
|
||||
if vim.version().minor >= 8 then
|
||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.format, opts)
|
||||
else
|
||||
vim.keymap.set('n', '<space>f', vim.lsp.buf.formatting, opts)
|
||||
end
|
||||
end
|
||||
if client.server_capabilities.documentRangeFormattingProvider then
|
||||
if vim.version().minor >= 8 then
|
||||
vim.keymap.set('v', '<space>f', vim.lsp.buf.format, opts)
|
||||
else
|
||||
vim.keymap.set('v', '<space>f', vim.lsp.buf.range_formatting, opts)
|
||||
end
|
||||
end
|
||||
|
||||
-- Set autocommands conditional on server_capabilities
|
||||
if client.server_capabilities.documentHighlightProvider then
|
||||
|
Loading…
x
Reference in New Issue
Block a user