vim/nvim: update tabline
This commit is contained in:
@@ -23,6 +23,7 @@ telescope.setup({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
map("n", "<C-t>", "<cmd> Telescope telescope-tabs list_tabs<CR>", default_opts) -- Show all tabs
|
||||||
map("n", "<C-f>", "<cmd> Telescope find_files hidden=true<CR>", default_opts) -- Show files
|
map("n", "<C-f>", "<cmd> Telescope find_files hidden=true<CR>", default_opts) -- Show files
|
||||||
map("n", "<C-s>", "<cmd> Telescope live_grep<CR>", default_opts) -- Grep through current directory
|
map("n", "<C-s>", "<cmd> Telescope live_grep<CR>", default_opts) -- Grep through current directory
|
||||||
map("n", "<C-k>", "<cmd> Telescope keymaps<CR>", default_opts) -- Show all keys
|
map("n", "<C-k>", "<cmd> Telescope keymaps<CR>", default_opts) -- Show all keys
|
||||||
@@ -115,13 +116,3 @@ cmp.setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- file tree
|
|
||||||
map("n", "<C-t>", "<cmd> NvimTreeFindFileToggle<CR>", default_opts) -- Show file tree
|
|
||||||
map("n", "<leader>tc", "<cmd> NvimTreeCollapse<CR>", default_opts) -- Collapse tree
|
|
||||||
wk.register({
|
|
||||||
["<leader>"] = {
|
|
||||||
t = {
|
|
||||||
c = { "Collapse Tree" },
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|||||||
@@ -55,6 +55,15 @@ return require('packer').startup(function(use)
|
|||||||
config = function() require('plugins.telescope-conf') end,
|
config = function() require('plugins.telescope-conf') end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- browse tabs in telescope
|
||||||
|
use {
|
||||||
|
'LukasPietzschmann/telescope-tabs',
|
||||||
|
requires = { 'nvim-telescope/telescope.nvim' },
|
||||||
|
config = function()
|
||||||
|
require'telescope-tabs'.setup{}
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
-- Auto Indentation
|
-- Auto Indentation
|
||||||
use({
|
use({
|
||||||
'nmac427/guess-indent.nvim',
|
'nmac427/guess-indent.nvim',
|
||||||
@@ -139,15 +148,6 @@ return require('packer').startup(function(use)
|
|||||||
config = function() require('plugins.nvim-colorizer-conf') end
|
config = function() require('plugins.nvim-colorizer-conf') end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- file tree
|
|
||||||
use {
|
|
||||||
'kyazdani42/nvim-tree.lua',
|
|
||||||
requires = {
|
|
||||||
'kyazdani42/nvim-web-devicons', -- optional, for file icons
|
|
||||||
},
|
|
||||||
config = function() require('plugins.nvim-tree-conf') end
|
|
||||||
}
|
|
||||||
|
|
||||||
-- cooler cmd line and notifications
|
-- cooler cmd line and notifications
|
||||||
use({
|
use({
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
|
|||||||
@@ -48,23 +48,30 @@ require('lualine').setup({
|
|||||||
},
|
},
|
||||||
tabline = {
|
tabline = {
|
||||||
lualine_a = {
|
lualine_a = {
|
||||||
|
-- function()
|
||||||
|
-- return mode_map[vim.api.nvim_get_mode().mode] or "__"
|
||||||
|
-- end
|
||||||
function()
|
function()
|
||||||
return mode_map[vim.api.nvim_get_mode().mode] or "__"
|
return '裡'
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
lualine_b = {
|
lualine_b = {
|
||||||
require('nvim-navic').get_location
|
{
|
||||||
|
'tabs',
|
||||||
|
mode = 2,
|
||||||
|
max_length = vim.o.columns / 2
|
||||||
|
}
|
||||||
|
},
|
||||||
|
lualine_c = {
|
||||||
|
|
||||||
},
|
},
|
||||||
lualine_c = {},
|
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
-- 'lsp_progress' -- noice already shows this.. better
|
-- 'lsp_progress' -- noice already shows this.. better
|
||||||
},
|
},
|
||||||
lualine_y = {},
|
lualine_y = {
|
||||||
lualine_z = {
|
require('nvim-navic').get_location
|
||||||
{
|
|
||||||
'filename',
|
|
||||||
path = 1,
|
|
||||||
},
|
},
|
||||||
|
lualine_z = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
-- all sections from left to right
|
-- all sections from left to right
|
||||||
@@ -78,6 +85,10 @@ require('lualine').setup({
|
|||||||
'branch',
|
'branch',
|
||||||
},
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
|
{
|
||||||
|
'filename',
|
||||||
|
path = 1,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -63,6 +63,33 @@ set laststatus=1 " 1: only if there are at least two windows
|
|||||||
set showtabline=1 " 1: only if there are at least two tab pages
|
set showtabline=1 " 1: only if there are at least two tab pages
|
||||||
let g:airline_powerline_fonts = 1
|
let g:airline_powerline_fonts = 1
|
||||||
|
|
||||||
|
" tabline
|
||||||
|
let g:airline#extensions#tabline#enabled = 1
|
||||||
|
let g:airline#extensions#tabline#formatter = 'default'
|
||||||
|
let g:airline#extensions#tabline#show_tabs = 1
|
||||||
|
let g:airline#extensions#tabline#show_tab_nr = 1
|
||||||
|
let g:airline#extensions#tabline#tab_nr_type = 1
|
||||||
|
let g:airline#extensions#tabline#show_buffers = 0
|
||||||
|
let g:airline#extensions#tabline#tabs_label = '裡'
|
||||||
|
let g:airline#extensions#tabline#show_close_button = 0
|
||||||
|
let g:airline#extensions#tabline#show_tab_count = 0
|
||||||
|
|
||||||
|
let g:airline_mode_map = {
|
||||||
|
\ 'i' : '',
|
||||||
|
\ 'ic' : '',
|
||||||
|
\ 'ix' : '',
|
||||||
|
\ 'n' : '',
|
||||||
|
\ 'multi' : '並',
|
||||||
|
\ 'ni' : '',
|
||||||
|
\ 'no' : '',
|
||||||
|
\ 'R' : 'ﰇ',
|
||||||
|
\ 'Rv' : 'ﰇ',
|
||||||
|
\ 'v' : '',
|
||||||
|
\ 'V' : ' ',
|
||||||
|
\ '␖' : ' 麗',
|
||||||
|
\ 'c' : ''
|
||||||
|
\ }
|
||||||
|
|
||||||
" ============================== Indents and Whitespaces
|
" ============================== Indents and Whitespaces
|
||||||
set list
|
set list
|
||||||
set listchars=tab:──\ ,extends:›,precedes:‹,nbsp:·,trail:· " show chars for whitespaces
|
set listchars=tab:──\ ,extends:›,precedes:‹,nbsp:·,trail:· " show chars for whitespaces
|
||||||
|
|||||||
Reference in New Issue
Block a user