From 279b9be02a6127609da52bb181a00783a91c9817 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 3 May 2022 12:49:59 +0200 Subject: nvim: disable global status, formatting --- .config/nvim/lua/options.lua | 3 +-- .config/nvim/lua/setup/lspconfig.lua | 1 + .config/nvim/lua/setup/lualine.lua | 26 +++++++++++++------------- .config/nvim/lua/setup/nvim-cmp.lua | 2 +- .config/nvim/lua/setup/nvim-treesitter.lua | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua index 55e32e7..9763c28 100644 --- a/.config/nvim/lua/options.lua +++ b/.config/nvim/lua/options.lua @@ -14,7 +14,7 @@ set.hlsearch = true set.ignorecase = true set.smartcase = true set.incsearch = true -set.backspace= 'indent,eol,start' +set.backspace = 'indent,eol,start' set.pastetoggle = '' set.confirm = true set.number = true @@ -34,7 +34,6 @@ set.pumblend = 0 set.splitright = true set.splitbelow = true set.cursorline = true -set.laststatus = 3 -- Disable default vim plugins local disabled_built_ins = { diff --git a/.config/nvim/lua/setup/lspconfig.lua b/.config/nvim/lua/setup/lspconfig.lua index 47fd84a..ad101a2 100644 --- a/.config/nvim/lua/setup/lspconfig.lua +++ b/.config/nvim/lua/setup/lspconfig.lua @@ -19,6 +19,7 @@ lspconfig.sumneko_lua.setup { } } } + lspconfig.rust_analyzer.setup { on_attach = on_attach, } diff --git a/.config/nvim/lua/setup/lualine.lua b/.config/nvim/lua/setup/lualine.lua index 4d08844..2a792b7 100644 --- a/.config/nvim/lua/setup/lualine.lua +++ b/.config/nvim/lua/setup/lualine.lua @@ -1,25 +1,25 @@ -require'lualine'.setup { +require 'lualine'.setup { options = { icons_enabled = true, theme = 'onedark', - component_separators = {left = '', right = ''}, - section_separators = {left = '', right = ''}, - disabled_filetypes = {'startify', 'terminal', 'netrw', 'NvimTree', 'packer'}, - globalstatus = true, + component_separators = { left = '', right = '' }, + section_separators = { left = '', right = '' }, + disabled_filetypes = { 'startify', 'terminal', 'netrw', 'NvimTree', 'packer' }, + globalstatus = false, }, sections = { - lualine_a = {'mode'}, - lualine_b = {'branch'}, - lualine_c = {'filename', 'diagnostics'}, - lualine_x = {'encoding', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'}, + lualine_a = { 'mode' }, + lualine_b = { 'branch' }, + lualine_c = { 'filename', 'diagnostics' }, + lualine_x = { 'encoding', 'filetype' }, + lualine_y = { 'progress' }, + lualine_z = { 'location' }, }, inactive_sections = { lualine_a = {}, lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, + lualine_c = { 'filename' }, + lualine_x = { 'location' }, lualine_y = {}, lualine_z = {}, }, diff --git a/.config/nvim/lua/setup/nvim-cmp.lua b/.config/nvim/lua/setup/nvim-cmp.lua index 83b54cd..5b62d61 100644 --- a/.config/nvim/lua/setup/nvim-cmp.lua +++ b/.config/nvim/lua/setup/nvim-cmp.lua @@ -1,5 +1,5 @@ local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + local line, col = table.unpack(vim.api.nvim_win_get_cursor(0)) return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil end diff --git a/.config/nvim/lua/setup/nvim-treesitter.lua b/.config/nvim/lua/setup/nvim-treesitter.lua index 42bfcbd..7bccf73 100644 --- a/.config/nvim/lua/setup/nvim-treesitter.lua +++ b/.config/nvim/lua/setup/nvim-treesitter.lua @@ -1,4 +1,4 @@ -require'nvim-treesitter.configs'.setup { +require 'nvim-treesitter.configs'.setup { highlight = { enable = true, }, -- cgit v1.2.3-70-g09d2