From 872fe99c314fa7ad5084673a38f8e09d4291d8a0 Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Thu, 6 Oct 2022 22:43:10 +0200 Subject: nvim: global statusline, winbar, cmdheight --- .config/nvim/lua/options.lua | 12 +++++++++++- .config/nvim/lua/plugins.lua | 2 -- .config/nvim/lua/setup/lspconfig.lua | 12 +++++++----- .config/nvim/lua/setup/lualine.lua | 3 ++- 4 files changed, 20 insertions(+), 9 deletions(-) (limited to '.config/nvim') diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua index 6e7c521..0b7e5a1 100644 --- a/.config/nvim/lua/options.lua +++ b/.config/nvim/lua/options.lua @@ -34,8 +34,18 @@ set.pumblend = 0 set.splitright = true set.splitbelow = true set.cursorline = true --- set.signcolumn = 'yes' +set.signcolumn = 'yes' set.title = true +set.ch = 0 +set.winbar = '%=%m %f' + +vim.cmd([[ +augroup CursorLine + au! + au VimEnter,WinEnter,BufWinEnter * setlocal cursorline + au WinLeave * setlocal nocursorline +augroup END +]]) -- Disable default vim plugins local disabled_built_ins = { diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index 0678685..2259b05 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -10,8 +10,6 @@ return require('packer').startup(function(use) use { "wbthomason/packer.nvim" } - use { "nathom/filetype.nvim" } - use { "nvim-lua/plenary.nvim", opt = true, diff --git a/.config/nvim/lua/setup/lspconfig.lua b/.config/nvim/lua/setup/lspconfig.lua index e65010d..488d35b 100644 --- a/.config/nvim/lua/setup/lspconfig.lua +++ b/.config/nvim/lua/setup/lspconfig.lua @@ -2,11 +2,13 @@ require("nvim-lsp-installer").setup {} local lspconfig = require("lspconfig") local function on_attach() - vim.cmd('doautocmd User lspAttached') - vim.cmd('augroup Format') - vim.cmd('autocmd! * ') - vim.cmd('autocmd BufWritePre lua vim.lsp.buf.formatting_sync()') - vim.cmd('augroup END') + vim.cmd([[ + doautocmd User lspAttached') + augroup Format + autocmd! * + autocmd BufWritePre lua vim.lsp.buf.formatting_sync() + augroup END + ]]) end lspconfig.sumneko_lua.setup { diff --git a/.config/nvim/lua/setup/lualine.lua b/.config/nvim/lua/setup/lualine.lua index 312fe65..be3c97a 100644 --- a/.config/nvim/lua/setup/lualine.lua +++ b/.config/nvim/lua/setup/lualine.lua @@ -7,7 +7,7 @@ local config = { component_separators = { left = '', right = '' }, section_separators = { left = '', right = '' }, disabled_filetypes = { 'startify', 'terminal', 'netrw', 'NvimTree', 'packer' }, - globalstatus = false, + globalstatus = true, }, sections = { lualine_a = { 'mode' }, @@ -34,6 +34,7 @@ local config = { -- end local function ins_right(component) + table.insert(config.sections.lualine_x, 1, component) end -- cgit v1.2.3-70-g09d2