Switch to cokeline.

master
Drake 3 years ago
parent 0b2e5eb3be
commit ca8f7771bd
No known key found for this signature in database
GPG Key ID: 9B83455BD94F12A3

@ -13,7 +13,7 @@ Plug 'joshdick/onedark.vim'
Plug 'nvim-treesitter/nvim-treesitter'
Plug('ms-jpq/coq_nvim', {branch = 'coq'})
Plug('ms-jpq/coq.artifacts', {branch = 'artifacts'})
Plug 'akinsho/bufferline.nvim'
Plug 'noib3/cokeline.nvim'
Plug 'numtostr/FTerm.nvim'
Plug 'andweeb/presence.nvim'
Plug 'tpope/vim-fugitive'

@ -7,8 +7,8 @@ map('v', '<C-v>', 'p', {noremap=true, silent=true})
map('i', '<C-z>', '<Esc>ui', {noremap=true, silent=true})
map('i', '<C-y>', '<Esc>:red<Enter>i', {noremap=true, silent=true})
map('i', '<C-s>', '<Esc>:w<Enter>i', {noremap=true})
map('n', '<C-[>', ':BufferLineCyclePrev<CR>', {noremap=true})
map('n', '<C-]>', ':BufferLineCycleNext<CR>', {noremap=true})
map('n', '<C-o>', ':Telescope find_files<CR>', {noremap=true})
map('n', '<C-[>', '<Plug>(cokeline-focus-prev)', {noremap=false})
map('n', '<C-]>', '<Plug>(cokeline-focus-next)', {noremap=false})
map('n', '<C-o>', '<CMD>Telescope find_files<CR>', {noremap=true})
map('n', '<C-i>', '<CMD>lua require("FTerm").toggle()<CR>', {noremap=true, silent=true})
map('i', '<C-j>', 'copilot#Accept("<CR>")', {noremap=true, silent=true, expr=true})

@ -1,3 +1,4 @@
local get_hex = require('cokeline/utils').get_hex
local gps = require("nvim-gps")
local coq = require "coq"
gps.setup()
@ -28,7 +29,7 @@ require('lualine').setup {
lualine_a = {'mode'},
lualine_b = {'branch'},
lualine_c = {'filename', { gps.get_location, condition = gps.is_available }},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_x = {'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
@ -44,4 +45,48 @@ require('lualine').setup {
extensions = {}
}
require("bufferline").setup({})
-- Credit to the original author of cokeline for creating most of this config
require('cokeline').setup({
default_hl = {
focused = {
fg = get_hex('Normal', 'fg'),
bg = get_hex('ColorColumn', 'bg'),
},
unfocused = {
fg = get_hex('Comment', 'fg'),
bg = get_hex('ColorColumn', 'bg'),
},
},
components = {
{
text = function(buffer)
if buffer.is_focused then
return '' .. buffer.devicon.icon
else
return '| ' .. buffer.devicon.icon
end
end,
hl = {
fg = function(buffer) return buffer.devicon.color end,
},
},
{
text = function(buffer) return buffer.unique_prefix end,
hl = {
fg = get_hex('Comment', 'fg'),
style = 'italic',
},
},
{
text = function(buffer) return buffer.filename .. ' ' end,
},
{
text = 'X',
delete_buffer_on_left_click = true,
},
{
text = ' ',
}
},
})

Loading…
Cancel
Save