diff --git a/nvim/init.vim b/nvim/init.vim index b8f3e80..c045209 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -7,9 +7,9 @@ call plug#begin() Plug 'ellisonleao/gruvbox.nvim' "Plug 'vim-airline/vim-airline' "Plug 'vim-airline/vim-airline-themes' -Plug 'ghifarit53/tokyonight-vim' +"Plug 'ghifarit53/tokyonight-vim' "Plug 'airblade/vim-gitgutter' -"Plug 'folke/tokyonight.nvim' +Plug 'folke/tokyonight.nvim' Plug 'nvim-lua/plenary.nvim' Plug 'nvim-tree/nvim-web-devicons' Plug 'MunifTanjim/nui.nvim' @@ -42,10 +42,12 @@ Plug 'MunifTanjim/nui.nvim' Plug 'rcarriga/nvim-notify' Plug 'folke/noice.nvim' "Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' } +Plug 'luukvbaal/statuscol.nvim' +"Plug 'linrongbin16/lsp-progress.nvim' call plug#end() set bg=dark -"colo gruvbox +colo default "let g:airline_theme = 'gruvbox' "let g:airline_powerline_fonts = 1 @@ -55,10 +57,12 @@ set noshowmode " set guifont=MesloLGM_Nerd_Font_Mono:h10:cANSI:qDRAFT "endif -set updatetime=100 -set signcolumn=yes +"set updatetime=100 +"set signcolumn=yes:1 +"let &stc='%s%=%{v:relnum?v:relnum:v:lnum} ' set laststatus=3 +set spell " .config/nvim/lua/init.lua lua require('init') diff --git a/nvim/lua/init.lua b/nvim/lua/init.lua index e5dd7cb..fc535e8 100644 --- a/nvim/lua/init.lua +++ b/nvim/lua/init.lua @@ -1,7 +1,23 @@ -require('plugins.gruvbox') +--vim.cmd('colorscheme default') +--require('plugins.gruvbox') require('plugins.feline') require('gitsigns').setup() require('plugins.matlab_ls') +require('plugins.lua_ls') require('plugins.treesitter') require('battery').setup() 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'}) diff --git a/nvim/lua/plugins/statuscol.lua b/nvim/lua/plugins/statuscol.lua new file mode 100644 index 0000000..67d55b2 --- /dev/null +++ b/nvim/lua/plugins/statuscol.lua @@ -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" + }, + } +}) diff --git a/nvim/lua/themes/default.lua b/nvim/lua/themes/default.lua new file mode 100644 index 0000000..6bc1969 --- /dev/null +++ b/nvim/lua/themes/default.lua @@ -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") +}