diff --git a/lua/setup/lualine.lua b/lua/setup/lualine.lua index b425551..a097b6f 100644 --- a/lua/setup/lualine.lua +++ b/lua/setup/lualine.lua @@ -1,50 +1,23 @@ -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 } } }, - inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, - globalstatus = true, - winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {} - }, - inactive_winbar = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { { 'filename', path = 1, file_status = true } }, - lualine_x = {}, - lualine_y = {}, - lualine_z = {} - }, - }) -else - require('lualine').setup({ - options = { theme = 'gruvbox' }, - sections = { lualine_c = { 'filename' } }, - globalstatus = false, - -- inactive_sections = { lualine_c = { 'filename' } }, - }) -end +vim.opt.laststatus = 3 +require('lualine').setup({ + options = { theme = 'gruvbox' }, + sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + inactive_sections = { lualine_c = { 'getcwd', { 'filename', path = 1, file_status = true } } }, + globalstatus = true, + winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, + inactive_winbar = { + lualine_a = {}, + lualine_b = {}, + lualine_c = { { 'filename', path = 1, file_status = true } }, + lualine_x = {}, + lualine_y = {}, + lualine_z = {} + }, +}) diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 7ec3cff..b358981 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -63,18 +63,10 @@ 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', 'f', vim.lsp.buf.format, opts) - else - vim.keymap.set('n', 'f', vim.lsp.buf.formatting, opts) - end + vim.keymap.set('n', 'f', vim.lsp.buf.format, opts) end if client.server_capabilities.documentRangeFormattingProvider then - if vim.version().minor >= 8 then - vim.keymap.set('v', 'f', vim.lsp.buf.format, opts) - else - vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) - end + vim.keymap.set('v', 'f', vim.lsp.buf.range_formatting, opts) end -- Set autocommands conditional on server_capabilities