Compare commits
No commits in common. "157da034393691766882ce7dc257514a4cd5f7d6" and "9ee391ac98fdebca9bb842264841f273ddc099ed" have entirely different histories.
157da03439
...
9ee391ac98
66
nvimrc
66
nvimrc
@ -234,11 +234,69 @@ nmap <leader>T :Files<cr>
|
|||||||
nmap <leader>b :Buffers<cr>
|
nmap <leader>b :Buffers<cr>
|
||||||
nmap <leader>rg :Rg<cr>
|
nmap <leader>rg :Rg<cr>
|
||||||
|
|
||||||
" lualine.nvim
|
" Lightline configuration:
|
||||||
packadd! lualine.nvim " https://git.netflux.io/rob/lualine.nvim.git
|
packadd! lightline.vim " https://github.com/itchyny/lightline.vim.git
|
||||||
packadd! nvim-web-devicons " https://github.com/nvim-tree/nvim-web-devicons.git
|
set laststatus=2
|
||||||
|
|
||||||
lua require "lightline_config"
|
function! LightlineLSPErrorText()
|
||||||
|
let l:count = luaeval("vim.diagnostic.get(0, [[Error]])")
|
||||||
|
if l:count == 0
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
return l:count . 'E'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineLSPWarningText()
|
||||||
|
let l:count = luaeval("vim.diagnostic.get(0, [[Warning]])")
|
||||||
|
if l:count == 0
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
return l:count . 'W'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! LightlineLSPInformationText()
|
||||||
|
let l:count = luaeval("vim.diagnostic.get(0, [[Information]])")
|
||||||
|
if l:count == 0
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
return l:count . 'I'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'seoul256',
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
|
\ [ 'readonly', 'filename', 'modified' ],
|
||||||
|
\ [ 'gitbranch' ], ['lsperror', 'lspwarn', 'lspinfo' ] ],
|
||||||
|
\ 'right': [ ['lineinfo'], ['percent'], ['filetype'], ['gobuild'] ],
|
||||||
|
\ },
|
||||||
|
\ 'component_function': {
|
||||||
|
\ 'gobuild': 'go#statusline#Show',
|
||||||
|
\ 'gitbranch': 'FugitiveStatusline',
|
||||||
|
\ },
|
||||||
|
\ 'component_expand': {
|
||||||
|
\ 'lsperror': 'LightlineLSPErrorText',
|
||||||
|
\ 'lspwarn': 'LightlineLSPWarningText',
|
||||||
|
\ 'lspinfo': 'LightlineLSPInformationText',
|
||||||
|
\ },
|
||||||
|
\ 'component_type': {
|
||||||
|
\ 'lsperror': 'error',
|
||||||
|
\ 'lspwarn': 'warning',
|
||||||
|
\ },
|
||||||
|
\ 'mode_map': {
|
||||||
|
\ 'n' : 'N',
|
||||||
|
\ 'i' : 'I',
|
||||||
|
\ 'R' : 'R',
|
||||||
|
\ 'v' : 'V',
|
||||||
|
\ 'V' : 'V-LINE',
|
||||||
|
\ "\<C-v>": 'V-BLOCK',
|
||||||
|
\ 'c' : 'C',
|
||||||
|
\ 's' : 'S',
|
||||||
|
\ 'S' : 'S-LINE',
|
||||||
|
\ "\<C-s>": 'S-BLOCK',
|
||||||
|
\ 't': 'TERM',
|
||||||
|
\ },
|
||||||
|
\ }
|
||||||
|
|
||||||
" vim-gitgutter configuration
|
" vim-gitgutter configuration
|
||||||
packadd! vim-gitgutter " https://github.com/airblade/vim-gitgutter.git
|
packadd! vim-gitgutter " https://github.com/airblade/vim-gitgutter.git
|
||||||
|
@ -1,79 +0,0 @@
|
|||||||
require("nvim-web-devicons").setup({})
|
|
||||||
|
|
||||||
local mode_map = {
|
|
||||||
NORMAL = "N",
|
|
||||||
INSERT = "I",
|
|
||||||
REPLACE = "R",
|
|
||||||
COMMAND = "C",
|
|
||||||
VISUAL = "v",
|
|
||||||
["V-BLOCK"] = "V",
|
|
||||||
["V-LINE"] = "V-LINE",
|
|
||||||
}
|
|
||||||
|
|
||||||
require("lualine").setup({
|
|
||||||
options = {
|
|
||||||
icons_enabled = false,
|
|
||||||
theme = "nord",
|
|
||||||
},
|
|
||||||
sections = {
|
|
||||||
lualine_a = {
|
|
||||||
{
|
|
||||||
"mode",
|
|
||||||
fmt = function(mode)
|
|
||||||
return mode_map[mode] or mode
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
"paste",
|
|
||||||
},
|
|
||||||
lualine_b = { "filename" },
|
|
||||||
lualine_c = {
|
|
||||||
{
|
|
||||||
"branch",
|
|
||||||
padding = { left = 0 },
|
|
||||||
},
|
|
||||||
"diff",
|
|
||||||
{
|
|
||||||
"diagnostics",
|
|
||||||
sources = { "nvim_lsp" },
|
|
||||||
always_visible = false,
|
|
||||||
symbols = {
|
|
||||||
error = function(count)
|
|
||||||
return count .. "E"
|
|
||||||
end,
|
|
||||||
warn = function(count)
|
|
||||||
return count .. "W"
|
|
||||||
end,
|
|
||||||
info = function(count)
|
|
||||||
return count .. "I"
|
|
||||||
end,
|
|
||||||
hint = function(count)
|
|
||||||
return count .. "H"
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_x = {
|
|
||||||
{
|
|
||||||
function()
|
|
||||||
local go_status_line = vim.api.nvim_call_function("go#statusline#Show", {})
|
|
||||||
if go_status_line ~= "" then
|
|
||||||
return go_status_line
|
|
||||||
end
|
|
||||||
|
|
||||||
return vim.bo.filetype
|
|
||||||
end,
|
|
||||||
padding = { left = 1, right = 0 },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
lualine_y = { { "progress", padding = { left = 1, right = 0 } } },
|
|
||||||
lualine_z = { { "location", padding = { left = 1, right = 0 } } },
|
|
||||||
},
|
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = { "filename" },
|
|
||||||
lualine_x = { { "location", padding = { right = 0 } } },
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {},
|
|
||||||
},
|
|
||||||
})
|
|
Loading…
x
Reference in New Issue
Block a user