[2024-06-07] Add status col plugin and default feline theme

This commit is contained in:
Andrew Conlin 2024-06-07 10:44:26 +01:00
parent f278ae145c
commit 013e2225eb
4 changed files with 68 additions and 6 deletions

View File

@ -7,9 +7,9 @@ call plug#begin()
Plug 'ellisonleao/gruvbox.nvim' Plug 'ellisonleao/gruvbox.nvim'
"Plug 'vim-airline/vim-airline' "Plug 'vim-airline/vim-airline'
"Plug 'vim-airline/vim-airline-themes' "Plug 'vim-airline/vim-airline-themes'
Plug 'ghifarit53/tokyonight-vim' "Plug 'ghifarit53/tokyonight-vim'
"Plug 'airblade/vim-gitgutter' "Plug 'airblade/vim-gitgutter'
"Plug 'folke/tokyonight.nvim' Plug 'folke/tokyonight.nvim'
Plug 'nvim-lua/plenary.nvim' Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-tree/nvim-web-devicons' Plug 'nvim-tree/nvim-web-devicons'
Plug 'MunifTanjim/nui.nvim' Plug 'MunifTanjim/nui.nvim'
@ -42,10 +42,12 @@ Plug 'MunifTanjim/nui.nvim'
Plug 'rcarriga/nvim-notify' Plug 'rcarriga/nvim-notify'
Plug 'folke/noice.nvim' Plug 'folke/noice.nvim'
"Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' } "Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' }
Plug 'luukvbaal/statuscol.nvim'
"Plug 'linrongbin16/lsp-progress.nvim'
call plug#end() call plug#end()
set bg=dark set bg=dark
"colo gruvbox colo default
"let g:airline_theme = 'gruvbox' "let g:airline_theme = 'gruvbox'
"let g:airline_powerline_fonts = 1 "let g:airline_powerline_fonts = 1
@ -55,10 +57,12 @@ set noshowmode
" set guifont=MesloLGM_Nerd_Font_Mono:h10:cANSI:qDRAFT " set guifont=MesloLGM_Nerd_Font_Mono:h10:cANSI:qDRAFT
"endif "endif
set updatetime=100 "set updatetime=100
set signcolumn=yes "set signcolumn=yes:1
"let &stc='%s%=%{v:relnum?v:relnum:v:lnum} '
set laststatus=3 set laststatus=3
set spell
" .config/nvim/lua/init.lua " .config/nvim/lua/init.lua
lua require('init') lua require('init')

View File

@ -1,7 +1,23 @@
require('plugins.gruvbox') --vim.cmd('colorscheme default')
--require('plugins.gruvbox')
require('plugins.feline') require('plugins.feline')
require('gitsigns').setup() require('gitsigns').setup()
require('plugins.matlab_ls') require('plugins.matlab_ls')
require('plugins.lua_ls')
require('plugins.treesitter') require('plugins.treesitter')
require('battery').setup() require('battery').setup()
require('plugins.noice') require('plugins.noice')
require('plugins.statuscol')
vim.diagnostic.config({
virtual_text = false,
underline = true,
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.INFO] = '',
[vim.diagnostic.severity.HINT] = ''
}
}
})
--vim.api.nvim_set_hl(0,"DiagnosticUnderlineWarn",{undercurl=true,sp='DiagnosticWarn'})

View File

@ -0,0 +1,16 @@
local builtin = require("statuscol.builtin")
require('statuscol').setup({
relculright = true,
ft_ignore = { 'neo-tree' },
segments = {
{
sign = { namespace={'diag*'} },
click = "v:lua.ScSa"
},
{ text = { builtin.lnumfunc }, click = "v:lua.ScLa", },
{
sign = { namespace={'git*'} },
click = "v:lua.ScSa"
},
}
})

View File

@ -0,0 +1,26 @@
-- :filter Nvim* highlight
local hex = function(n)
return string.format("#%06x", n)
end
local fg = function(n)
colour = vim.api.nvim_get_hl_by_name(n, true)
return hex(colour.foreground)
end
local bg = function(n)
colour = vim.api.nvim_get_hl_by_name(n, true)
return hex(colour.background)
end
return {
bg = '#000000',
black = '#000000',
fg = fg("Normal"),
green = fg("DiagnosticOk"),
blue = fg("DiagnosticHint"),
orange = fg("DiagnosticWarn"),
red = fg("DiagnosticError"),
purple = fg("DiagnosticHint"),
white = '#FFFFFF',
yellow = fg("DiagnosticWarn"),
aqua = fg("DiagnosticHint")
}