mirror of
https://git.disroot.org/FollieHiyuki/dotfiles.git
synced 2024-11-25 00:38:23 -05:00
Bunch of changes
- emacs: enable parinfer - neovim: + add config for sniprun + replace lsp-rooter.nvim with project.nvim + replace galaxyline.nvim with feline.nvim + update config for gitsigns.nvim, nvimtree and alpha-nvim
This commit is contained in:
parent
22945505ed
commit
0b6f538235
@ -173,6 +173,7 @@
|
|||||||
"--header-insertion=iwyu"
|
"--header-insertion=iwyu"
|
||||||
"--header-insertion-decorators"))
|
"--header-insertion-decorators"))
|
||||||
(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
|
(after! lsp-clangd (set-lsp-priority! 'clangd 2)) ;; Prefer clangd instead of default ccls
|
||||||
|
;; Self-built lua-language-server in .local/etc/lsp/lua-language-server
|
||||||
(after! lsp-lua
|
(after! lsp-lua
|
||||||
(setq lsp-clients-lua-language-server-bin (expand-file-name "lsp/lua-language-server/bin/Linux/lua-language-server" doom-etc-dir)
|
(setq lsp-clients-lua-language-server-bin (expand-file-name "lsp/lua-language-server/bin/Linux/lua-language-server" doom-etc-dir)
|
||||||
lsp-clients-lua-language-server-main-location (expand-file-name "lsp/lua-language-server/main.lua" doom-etc-dir)
|
lsp-clients-lua-language-server-main-location (expand-file-name "lsp/lua-language-server/main.lua" doom-etc-dir)
|
||||||
@ -184,6 +185,13 @@
|
|||||||
(after! which-key
|
(after! which-key
|
||||||
(setq which-key-idle-delay 0.5))
|
(setq which-key-idle-delay 0.5))
|
||||||
|
|
||||||
|
;; Self-built parinfer-rust in .local/etc/parinfer-rust (cargo build --release --features emacs)
|
||||||
|
(use-package! parinfer-rust-mode
|
||||||
|
:init
|
||||||
|
(setq parinfer-rust-library
|
||||||
|
(concat doom-etc-dir "parinfer-rust/target/release/libparinfer_rust.so")
|
||||||
|
parinfer-rust-auto-download nil))
|
||||||
|
|
||||||
;; Org
|
;; Org
|
||||||
(setq org-directory "~/Documents/Org/")
|
(setq org-directory "~/Documents/Org/")
|
||||||
(after! org
|
(after! org
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
;;lispy ; vim for lisp, for people who don't like vim
|
;;lispy ; vim for lisp, for people who don't like vim
|
||||||
multiple-cursors ; editing in many places at once
|
multiple-cursors ; editing in many places at once
|
||||||
;;objed ; text object editing for the innocent
|
;;objed ; text object editing for the innocent
|
||||||
;;(parinfer +rust) ; turn lisp into python, sort of
|
(parinfer +rust) ; turn lisp into python, sort of
|
||||||
;;rotate-text ; cycle region at point between text candidates
|
;;rotate-text ; cycle region at point between text candidates
|
||||||
snippets ; my elves. They type so I don't have to
|
snippets ; my elves. They type so I don't have to
|
||||||
;;word-wrap ; soft wrapping with language-aware indent
|
;;word-wrap ; soft wrapping with language-aware indent
|
||||||
|
@ -308,10 +308,10 @@ local function highlight_plugins()
|
|||||||
hi('EftSubChar', c.grey3, '', 'bold,underline', '')
|
hi('EftSubChar', c.grey3, '', 'bold,underline', '')
|
||||||
|
|
||||||
-- dashboard-nvim / alpha-nvim
|
-- dashboard-nvim / alpha-nvim
|
||||||
hi('DashboardHeader' , c.cyan , '', 'bold' , '')
|
hi('DashboardHeader' , c.blue , '', 'bold' , '')
|
||||||
hi('DashboardCenter' , c.blue , '', 'bold' , '')
|
hi('DashboardCenter' , c.green , '', 'bold' , '')
|
||||||
hi('DashboardShortcut', c.grey_bright, '', 'bold,italic', '')
|
hi('DashboardShortcut', c.grey_bright, '', 'bold,italic', '')
|
||||||
hi('DashboardFooter' , c.green , '', 'bold' , '')
|
hi('DashboardFooter' , c.purple , '', 'bold' , '')
|
||||||
|
|
||||||
-- NvimTree
|
-- NvimTree
|
||||||
hi('NvimTreeRootFolder' , c.teal , '', 'bold', '')
|
hi('NvimTreeRootFolder' , c.teal , '', 'bold', '')
|
||||||
|
@ -129,7 +129,7 @@ wk.register({
|
|||||||
d = {':bdelete<CR>', 'Close buffer'},
|
d = {':bdelete<CR>', 'Close buffer'},
|
||||||
j = {':BufferLineCyclePrev<CR>', 'Previous buffer'},
|
j = {':BufferLineCyclePrev<CR>', 'Previous buffer'},
|
||||||
k = {':BufferLineCycleNext<CR>', 'Next buffer'},
|
k = {':BufferLineCycleNext<CR>', 'Next buffer'},
|
||||||
n = {':enew <BAR> startinsert <CR>', 'New buffer'},
|
n = {':enew<CR>', 'New buffer'},
|
||||||
u = {':UndotreeToggle<CR>', 'Undotree'},
|
u = {':UndotreeToggle<CR>', 'Undotree'},
|
||||||
z = {':ZenMode<CR>', 'Zen mode'}
|
z = {':ZenMode<CR>', 'Zen mode'}
|
||||||
},
|
},
|
||||||
@ -161,6 +161,7 @@ wk.register({
|
|||||||
a = {':Telescope autocommands<CR>', 'Autocommands'},
|
a = {':Telescope autocommands<CR>', 'Autocommands'},
|
||||||
b = {':Telescope buffers<CR>', 'Buffers'},
|
b = {':Telescope buffers<CR>', 'Buffers'},
|
||||||
c = {':Telescope commands<CR>', 'Commands'},
|
c = {':Telescope commands<CR>', 'Commands'},
|
||||||
|
d = {':Telescope projects<CR>', 'Recent directories'},
|
||||||
e = {':Telescope file_browser<CR>', 'File browser'},
|
e = {':Telescope file_browser<CR>', 'File browser'},
|
||||||
f = {':Telescope find_files<CR>', 'Find files'},
|
f = {':Telescope find_files<CR>', 'Find files'},
|
||||||
g = {':Telescope live_grep<CR>', 'Live grep'},
|
g = {':Telescope live_grep<CR>', 'Live grep'},
|
||||||
|
@ -149,4 +149,15 @@ function M.comment_conf()
|
|||||||
require('nvim_comment').setup({comment_empty = false})
|
require('nvim_comment').setup({comment_empty = false})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.project_conf()
|
||||||
|
require('project_nvim').setup {
|
||||||
|
manual_mode = false,
|
||||||
|
detection_methods = {'pattern', 'lsp'},
|
||||||
|
patterns = {'.git', '_darcs', '.hg', '.bzr', '.svn', 'Makefile', 'package.json', '*.pro', 'Dockerfile', '>Code'},
|
||||||
|
show_hidden = true,
|
||||||
|
silent_chdir = true,
|
||||||
|
datapath = vim.fn.stdpath('data')
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
@ -28,7 +28,8 @@ function M.telescope_conf()
|
|||||||
},
|
},
|
||||||
extensions = {
|
extensions = {
|
||||||
project = {
|
project = {
|
||||||
base_dirs = {{'~/Code', max_depth = 2}}
|
base_dirs = {{'~/Code', max_depth = 4}},
|
||||||
|
hidden_files = true
|
||||||
},
|
},
|
||||||
fzf = {
|
fzf = {
|
||||||
fuzzy = true,
|
fuzzy = true,
|
||||||
@ -38,6 +39,7 @@ function M.telescope_conf()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
require('telescope').load_extension('projects')
|
||||||
require('telescope').load_extension('project')
|
require('telescope').load_extension('project')
|
||||||
require('telescope').load_extension('fzf')
|
require('telescope').load_extension('fzf')
|
||||||
end
|
end
|
||||||
@ -259,6 +261,37 @@ function M.neoscroll_conf()
|
|||||||
require('neoscroll').setup()
|
require('neoscroll').setup()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.sniprun_conf()
|
||||||
|
local c = require('colors.' .. vim.g.global_theme).colors
|
||||||
|
|
||||||
|
require('sniprun').setup {
|
||||||
|
display = {
|
||||||
|
'Classic', --# display results in the command-line area
|
||||||
|
'VirtualTextOk', --# display ok results as virtual text (multiline is shortened)
|
||||||
|
-- 'VirtualTextErr', --# display error results as virtual text
|
||||||
|
-- 'TempFloatingWindow', --# display results in a floating window
|
||||||
|
-- 'LongTempFloatingWindow', --# same as above, but only long results. To use with VirtualText__
|
||||||
|
-- 'Terminal', --# display results in a vertical split
|
||||||
|
-- 'NvimNotify', --# display with the nvim-notify plugin
|
||||||
|
-- 'Api' --# return output to a programming interface
|
||||||
|
},
|
||||||
|
show_no_output = {
|
||||||
|
'Classic',
|
||||||
|
'TempFloatingWindow' --# implies LongTempFloatingWindow, which has no effect on its own
|
||||||
|
},
|
||||||
|
snipruncolors = {
|
||||||
|
SniprunVirtualTextOk = {bg = c.cyan, fg = c.black},
|
||||||
|
SniprunFloatingWinOk = {fg = c.cyan},
|
||||||
|
SniprunVirtualTextErr = {bg = c.orange, fg = c.black},
|
||||||
|
SniprunFloatingWinErr = {fg = c.orange}
|
||||||
|
},
|
||||||
|
inline_messages = 0, --# inline_message (0/1) is a one-line way to display messages
|
||||||
|
--# to workaround sniprun not being able to display anything
|
||||||
|
borders = 'single' --# display borders around floating windows
|
||||||
|
--# possible values are 'none', 'single', 'double', or 'shadow'
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
function M.session_conf()
|
function M.session_conf()
|
||||||
require('persistence').setup {
|
require('persistence').setup {
|
||||||
dir = vim.fn.expand(vim.fn.stdpath('data') .. '/sessions/'),
|
dir = vim.fn.expand(vim.fn.stdpath('data') .. '/sessions/'),
|
||||||
|
@ -65,11 +65,12 @@ function M.dashboard_conf()
|
|||||||
dashboard.section.buttons = {
|
dashboard.section.buttons = {
|
||||||
type = 'group',
|
type = 'group',
|
||||||
val = {
|
val = {
|
||||||
button('SPC b n', ' New file'),
|
button('SPC f g', ' Find word'),
|
||||||
button('SPC f f', ' Find file'),
|
button('SPC f f', ' Find file'),
|
||||||
button('SPC f o', ' Recent files'),
|
button('SPC f o', ' Recent files'),
|
||||||
button('SPC f g', ' Find word'),
|
button('SPC f d', 'ﱮ Recent directories'),
|
||||||
button('SPC f m', ' Bookmarks'),
|
button('SPC f m', ' Bookmarks'),
|
||||||
|
button('SPC f p', ' Projects'),
|
||||||
button('SPC e l', ' Load last session')
|
button('SPC e l', ' Load last session')
|
||||||
},
|
},
|
||||||
opts = {spacing = 1}
|
opts = {spacing = 1}
|
||||||
@ -93,237 +94,202 @@ autocmd FileType alpha set showtabline=0 | autocmd BufUnload <buffer> set showta
|
|||||||
end
|
end
|
||||||
|
|
||||||
function M.statusline_conf()
|
function M.statusline_conf()
|
||||||
local gl = require('galaxyline')
|
|
||||||
local gls = gl.section
|
|
||||||
local condition = require('galaxyline.condition')
|
|
||||||
local colors = require('colors.' .. vim.g.global_theme).colors
|
local colors = require('colors.' .. vim.g.global_theme).colors
|
||||||
|
|
||||||
gl.short_line_list = {'NvimTree', 'packer', 'Outline'}
|
local vi_mode_colors = {
|
||||||
|
NORMAL = colors.green,
|
||||||
gls.left[1] = {
|
OP = colors.green,
|
||||||
LeftCorner = {
|
INSERT = colors.blue,
|
||||||
provider = function()
|
VISUAL = colors.yellow,
|
||||||
return '▊ '
|
LINES = colors.yellow,
|
||||||
end,
|
BLOCK = colors.yellow,
|
||||||
highlight = {colors.blue, colors.grey1}
|
REPLACE = colors.red,
|
||||||
}
|
['V-REPLACE'] = colors.red,
|
||||||
|
ENTER = colors.cyan,
|
||||||
|
MORE = colors.cyan,
|
||||||
|
SELECT = colors.orange,
|
||||||
|
COMMAND = colors.purple,
|
||||||
|
SHELL = colors.green,
|
||||||
|
TERM = colors.green,
|
||||||
|
NONE = colors.white2
|
||||||
}
|
}
|
||||||
|
|
||||||
gls.left[2] = {
|
local function file_osinfo()
|
||||||
ViMode = {
|
local os = vim.bo.fileformat:upper()
|
||||||
provider = function()
|
local icon
|
||||||
local mode_color = {
|
if os == 'UNIX' then
|
||||||
n = colors.green, -- Normal
|
icon = ' '
|
||||||
no = colors.green, -- N-Pending
|
elseif os == 'MAC' then
|
||||||
i = colors.blue, -- Insert
|
icon = ' '
|
||||||
ic = colors.blue, -- Insert
|
else
|
||||||
v = colors.yellow, -- Visual
|
icon = ' '
|
||||||
[''] = colors.yellow, -- V-Block
|
|
||||||
V = colors.yellow, -- V-Line
|
|
||||||
c = colors.white2, -- Command
|
|
||||||
s = colors.purple, -- Select
|
|
||||||
S = colors.purple, -- S-Line
|
|
||||||
[''] = colors.purple, -- S-Block
|
|
||||||
R = colors.red, -- Replace
|
|
||||||
Rv = colors.red, -- V-Replace
|
|
||||||
cv = colors.white2, -- Vim-Ex
|
|
||||||
ce = colors.white2, -- Ex
|
|
||||||
r = colors.cyan, -- Prompt
|
|
||||||
rm = colors.cyan, -- More
|
|
||||||
['r?'] = colors.cyan, -- Confirm
|
|
||||||
['!'] = colors.orange, -- Shell
|
|
||||||
t = colors.orange -- Terminal
|
|
||||||
}
|
|
||||||
vim.api.nvim_command('hi GalaxyViMode guifg=' .. mode_color[vim.fn.mode()])
|
|
||||||
return ' '
|
|
||||||
end,
|
|
||||||
highlight = {colors.green, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[3] = {
|
|
||||||
FileSize = {
|
|
||||||
provider = 'FileSize',
|
|
||||||
condition = condition.buffer_not_empty,
|
|
||||||
highlight = {colors.fg, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[4] ={
|
|
||||||
FileIcon = {
|
|
||||||
provider = 'FileIcon',
|
|
||||||
condition = condition.buffer_not_empty,
|
|
||||||
highlight = {
|
|
||||||
require('galaxyline.provider_fileinfo').get_file_icon_color,
|
|
||||||
colors.grey1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[5] = {
|
|
||||||
FileName = {
|
|
||||||
provider = 'FileName',
|
|
||||||
condition = condition.buffer_not_empty,
|
|
||||||
highlight = {colors.fg, colors.grey1, 'bold'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[6] = {
|
|
||||||
LineInfo = {
|
|
||||||
provider = 'LineColumn',
|
|
||||||
highlight = {colors.fg, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[7] = {
|
|
||||||
PerCent = {
|
|
||||||
provider = 'LinePercent',
|
|
||||||
highlight = {colors.fg, colors.grey1, 'bold'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[8] = {
|
|
||||||
DiagnosticError = {
|
|
||||||
provider = 'DiagnosticError',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.red, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[9] = {
|
|
||||||
DiagnosticWarn = {
|
|
||||||
provider = 'DiagnosticWarn',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.yellow, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[10] = {
|
|
||||||
DiagnosticHint = {
|
|
||||||
provider = 'DiagnosticHint',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.cyan, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.left[11] = {
|
|
||||||
DiagnosticInfo = {
|
|
||||||
provider = 'DiagnosticInfo',
|
|
||||||
icon = ' ',
|
|
||||||
highlight = {colors.blue, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[1] = {
|
|
||||||
ShowLspClient = {
|
|
||||||
provider = 'GetLspClient',
|
|
||||||
condition = function ()
|
|
||||||
local tbl = {['dashboard'] = true, [''] = true}
|
|
||||||
if tbl[vim.bo.filetype] then
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
return true
|
return icon .. os
|
||||||
|
end
|
||||||
|
|
||||||
|
local vi_mode_utils = require('feline.providers.vi_mode')
|
||||||
|
|
||||||
|
local comps = {
|
||||||
|
dummy = {
|
||||||
|
provider = '▊',
|
||||||
|
hl = {fg = colors.blue},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
vi_mode = {
|
||||||
|
provider = ' ',
|
||||||
|
hl = function()
|
||||||
|
return {
|
||||||
|
name = vi_mode_utils.get_mode_highlight_name(),
|
||||||
|
fg = vi_mode_utils.get_mode_color()
|
||||||
|
}
|
||||||
end,
|
end,
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
filesize = {
|
||||||
|
provider = 'file_size',
|
||||||
|
hl = {fg = colors.fg, style = 'bold'},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
fileinfo = {
|
||||||
|
provider = {
|
||||||
|
name = 'file_info',
|
||||||
|
opts = {
|
||||||
|
file_modified_icon = ' ',
|
||||||
|
file_readonly_icon = '🔒',
|
||||||
|
type = 'base-only' -- relative, unique
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hl = {fg = colors.blue, style = 'bold'},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
lineinfo = {
|
||||||
|
provider = 'position',
|
||||||
|
hl = {fg = colors.fg},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
percent = {
|
||||||
|
provider = 'line_percentage',
|
||||||
|
hl = {fg = colors.fg, style = 'bold'},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
diagerr = {
|
||||||
|
provider = 'diagnostic_errors',
|
||||||
|
icon = ' ',
|
||||||
|
hl = {fg = colors.red},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
diagwarn = {
|
||||||
|
provider = 'diagnostic_warnings',
|
||||||
|
icon = ' ',
|
||||||
|
hl = {fg = colors.yellow},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
diaghint = {
|
||||||
|
provider = 'diagnostic_hints',
|
||||||
|
icon = ' ',
|
||||||
|
hl = {fg = colors.cyan},
|
||||||
|
right_sep = ' '
|
||||||
|
},
|
||||||
|
diaginfo = {
|
||||||
|
provider = 'diagnostic_info',
|
||||||
|
icon = ' ',
|
||||||
|
hl = {fg = colors.blue}
|
||||||
|
},
|
||||||
|
lspclient = {
|
||||||
|
provider = 'lsp_client_names',
|
||||||
icon = ' LSP:',
|
icon = ' LSP:',
|
||||||
highlight = {colors.purple, colors.grey1, 'bold'}
|
hl = {fg = colors.purple, style = 'bold'}
|
||||||
}
|
},
|
||||||
}
|
format = {
|
||||||
|
provider = file_osinfo,
|
||||||
gls.right[2] = {
|
hl = {fg = colors.cyan},
|
||||||
FileEncode = {
|
left_sep = ' '
|
||||||
provider = 'FileEncode',
|
},
|
||||||
condition = condition.hide_in_width,
|
encode = {
|
||||||
separator = ' ',
|
provider = 'file_encoding',
|
||||||
separator_highlight = {'NONE', colors.grey1},
|
hl = {fg = colors.fg},
|
||||||
highlight = {colors.fg, colors.grey1}
|
left_sep = ' '
|
||||||
}
|
},
|
||||||
}
|
filetype = {
|
||||||
|
provider = 'file_type',
|
||||||
gls.right[3] = {
|
hl = {fg = colors.blue, style = 'bold'},
|
||||||
FileFormat = {
|
left_sep = ' '
|
||||||
provider = 'FileFormat',
|
},
|
||||||
condition = condition.hide_in_width,
|
gitbranch = {
|
||||||
separator = ' ',
|
provider = 'git_branch',
|
||||||
separator_highlight = {'NONE', colors.grey1},
|
icon = ' ',
|
||||||
highlight = {colors.fg, colors.grey1}
|
hl = {fg = colors.green, style = 'bold'},
|
||||||
}
|
left_sep = ' '
|
||||||
}
|
},
|
||||||
|
diffadd = {
|
||||||
gls.right[4] = {
|
provider = 'git_diff_added',
|
||||||
GitIcon = {
|
|
||||||
provider = function() return ' ' end,
|
|
||||||
condition = condition.check_git_workspace,
|
|
||||||
separator = ' ',
|
|
||||||
separator_highlight = {'NONE', colors.grey1},
|
|
||||||
highlight = {colors.green, colors.grey1, 'bold'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[5] = {
|
|
||||||
GitBranch = {
|
|
||||||
provider = 'GitBranch',
|
|
||||||
condition = condition.check_git_workspace,
|
|
||||||
highlight = {colors.green, colors.grey1, 'bold'}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[6] = {
|
|
||||||
GitSeparator = {
|
|
||||||
provider = function()
|
|
||||||
return ' '
|
|
||||||
end,
|
|
||||||
highlight = {colors.green, colors.grey1}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.right[7] = {
|
|
||||||
DiffAdd = {
|
|
||||||
provider = 'DiffAdd',
|
|
||||||
condition = condition.hide_in_width,
|
|
||||||
icon = ' ',
|
icon = ' ',
|
||||||
highlight = {colors.green, colors.grey1}
|
hl = {fg = colors.green},
|
||||||
}
|
left_sep = ' '
|
||||||
}
|
},
|
||||||
|
diffchange = {
|
||||||
gls.right[8] = {
|
provider = 'git_diff_changed',
|
||||||
DiffModified = {
|
|
||||||
provider = 'DiffModified',
|
|
||||||
condition = condition.hide_in_width,
|
|
||||||
icon = '柳',
|
icon = '柳',
|
||||||
highlight = {colors.yellow, colors.grey1}
|
hl = {fg = colors.yellow},
|
||||||
}
|
left_sep = ' '
|
||||||
}
|
},
|
||||||
|
diffremove = {
|
||||||
gls.right[9] = {
|
provider = 'git_diff_removed',
|
||||||
DiffRemove = {
|
|
||||||
provider = 'DiffRemove',
|
|
||||||
condition = condition.hide_in_width,
|
|
||||||
icon = ' ',
|
icon = ' ',
|
||||||
highlight = {colors.red, colors.grey1}
|
hl = {fg = colors.red},
|
||||||
|
left_sep = ' '
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gls.short_line_left[1] = {
|
-- Initialize the components table before defining it
|
||||||
BufferType = {
|
local components = {
|
||||||
provider = 'FileTypeName',
|
active = {},
|
||||||
separator = ' ',
|
inactive = {}
|
||||||
separator_highlight = {'NONE', colors.grey1},
|
|
||||||
highlight = {colors.blue, colors.grey1, 'bold'}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gls.short_line_left[2] = {
|
table.insert(components.active, {})
|
||||||
SFileName = {
|
table.insert(components.active, {})
|
||||||
provider = 'SFileName',
|
table.insert(components.active, {})
|
||||||
condition = condition.buffer_not_empty,
|
table.insert(components.inactive, {})
|
||||||
highlight = {colors.fg, colors.grey1, 'bold'}
|
table.insert(components.inactive, {})
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gls.short_line_right[1] = {
|
table.insert(components.active[1], comps.dummy)
|
||||||
BufferIcon = {
|
table.insert(components.active[1], comps.vi_mode)
|
||||||
provider= 'BufferIcon',
|
table.insert(components.active[1], comps.filesize)
|
||||||
highlight = {colors.fg, colors.grey1}
|
table.insert(components.active[1], comps.fileinfo)
|
||||||
|
table.insert(components.active[1], comps.lineinfo)
|
||||||
|
table.insert(components.active[1], comps.percent)
|
||||||
|
table.insert(components.active[1], comps.diagerr)
|
||||||
|
table.insert(components.active[1], comps.diagwarn)
|
||||||
|
table.insert(components.active[1], comps.diaghint)
|
||||||
|
table.insert(components.active[1], comps.diaginfo)
|
||||||
|
table.insert(components.active[3], comps.lspclient)
|
||||||
|
table.insert(components.active[3], comps.format)
|
||||||
|
table.insert(components.active[3], comps.encode)
|
||||||
|
table.insert(components.active[3], comps.filetype)
|
||||||
|
table.insert(components.active[3], comps.gitbranch)
|
||||||
|
table.insert(components.active[3], comps.diffadd)
|
||||||
|
table.insert(components.active[3], comps.diffchange)
|
||||||
|
table.insert(components.active[3], comps.diffremove)
|
||||||
|
table.insert(components.inactive[1], comps.dummy)
|
||||||
|
table.insert(components.inactive[1], comps.fileinfo)
|
||||||
|
table.insert(components.inactive[2], comps.filetype)
|
||||||
|
|
||||||
|
require('feline').setup {
|
||||||
|
colors = {bg = colors.grey1, fg = colors.fg},
|
||||||
|
components = components,
|
||||||
|
vi_mode_colors = vi_mode_colors,
|
||||||
|
force_inactive = {
|
||||||
|
filetypes = {
|
||||||
|
'packer',
|
||||||
|
'NvimTree',
|
||||||
|
'alpha',
|
||||||
|
'undotree',
|
||||||
|
'DIFF',
|
||||||
|
'Outline'
|
||||||
|
},
|
||||||
|
buftypes = {'terminal', 'nofile'},
|
||||||
|
bufnames = {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
@ -358,10 +324,8 @@ end
|
|||||||
function M.nvimtree_conf()
|
function M.nvimtree_conf()
|
||||||
vim.g.nvim_tree_width = 35
|
vim.g.nvim_tree_width = 35
|
||||||
vim.g.nvim_tree_ignore = {'.git', '.hg', '.svn', 'node_modules'}
|
vim.g.nvim_tree_ignore = {'.git', '.hg', '.svn', 'node_modules'}
|
||||||
vim.g.nvim_tree_auto_open = 0
|
|
||||||
vim.g.nvim_tree_auto_close = 1
|
|
||||||
vim.g.nvim_tree_auto_ignore_ft = {'dashboard'}
|
vim.g.nvim_tree_auto_ignore_ft = {'dashboard'}
|
||||||
vim.g.nvim_tree_follow = 1
|
vim.g.nvim_tree_respect_buf_cwd = 1
|
||||||
vim.g.nvim_tree_indent_markers = 1
|
vim.g.nvim_tree_indent_markers = 1
|
||||||
vim.g.nvim_tree_git_hl = 1
|
vim.g.nvim_tree_git_hl = 1
|
||||||
vim.g.nvim_tree_auto_resize = 0
|
vim.g.nvim_tree_auto_resize = 0
|
||||||
@ -452,7 +416,7 @@ function M.gitsigns_conf()
|
|||||||
['o ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>',
|
['o ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>',
|
||||||
['x ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>'
|
['x ih'] = ':<C-U>lua require"gitsigns.actions".select_hunk()<CR>'
|
||||||
},
|
},
|
||||||
watch_index = {
|
watch_gitdir = {
|
||||||
interval = 1000,
|
interval = 1000,
|
||||||
follow_files = true
|
follow_files = true
|
||||||
},
|
},
|
||||||
|
@ -29,9 +29,8 @@ return require('packer').startup(
|
|||||||
event = 'VimEnter',
|
event = 'VimEnter',
|
||||||
config = ui.dashboard_conf
|
config = ui.dashboard_conf
|
||||||
}
|
}
|
||||||
use { -- TODO: consider moving to feline.nvim
|
use {
|
||||||
'glepnir/galaxyline.nvim',
|
'famiu/feline.nvim',
|
||||||
branch = 'main',
|
|
||||||
wants = 'nvim-web-devicons',
|
wants = 'nvim-web-devicons',
|
||||||
config = ui.statusline_conf
|
config = ui.statusline_conf
|
||||||
}
|
}
|
||||||
@ -43,7 +42,16 @@ return require('packer').startup(
|
|||||||
use {
|
use {
|
||||||
'kyazdani42/nvim-tree.lua',
|
'kyazdani42/nvim-tree.lua',
|
||||||
cmd = 'NvimTreeToggle',
|
cmd = 'NvimTreeToggle',
|
||||||
setup = ui.nvimtree_conf
|
setup = ui.nvimtree_conf,
|
||||||
|
-- FIX: when all the options are migrated to setup()
|
||||||
|
config = function()
|
||||||
|
require('nvim-tree').setup {
|
||||||
|
open_on_setup = false,
|
||||||
|
auto_close = true,
|
||||||
|
hijack_cursor = true,
|
||||||
|
update_cwd = true
|
||||||
|
}
|
||||||
|
end
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
'folke/which-key.nvim',
|
'folke/which-key.nvim',
|
||||||
@ -137,6 +145,11 @@ return require('packer').startup(
|
|||||||
run = 'cargo build --release',
|
run = 'cargo build --release',
|
||||||
ft = {'clojure', 'lisp', 'scheme', 'fennel'}
|
ft = {'clojure', 'lisp', 'scheme', 'fennel'}
|
||||||
}
|
}
|
||||||
|
use {
|
||||||
|
'ahmedkhalf/project.nvim',
|
||||||
|
event = 'BufEnter',
|
||||||
|
config = editor.project_conf
|
||||||
|
}
|
||||||
|
|
||||||
---------
|
---------
|
||||||
-- LSP --
|
-- LSP --
|
||||||
@ -155,10 +168,6 @@ return require('packer').startup(
|
|||||||
wants = 'nvim-lspconfig',
|
wants = 'nvim-lspconfig',
|
||||||
config = lsp.sqls_conf
|
config = lsp.sqls_conf
|
||||||
}
|
}
|
||||||
use {
|
|
||||||
'ahmedkhalf/lsp-rooter.nvim',
|
|
||||||
after = 'nvim-lspconfig'
|
|
||||||
}
|
|
||||||
use {
|
use {
|
||||||
'folke/trouble.nvim',
|
'folke/trouble.nvim',
|
||||||
cmd = {'Trouble', 'TroubleToggle', 'TroubleRefresh'},
|
cmd = {'Trouble', 'TroubleToggle', 'TroubleRefresh'},
|
||||||
@ -245,7 +254,7 @@ return require('packer').startup(
|
|||||||
-- Tools --
|
-- Tools --
|
||||||
-----------
|
-----------
|
||||||
local tools = require('modules.tools')
|
local tools = require('modules.tools')
|
||||||
use {
|
use { -- TODO: watch out for fzf-lua
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
cmd = 'Telescope',
|
cmd = 'Telescope',
|
||||||
wants = {
|
wants = {
|
||||||
@ -359,10 +368,11 @@ return require('packer').startup(
|
|||||||
event = 'WinScrolled',
|
event = 'WinScrolled',
|
||||||
config = tools.neoscroll_conf
|
config = tools.neoscroll_conf
|
||||||
}
|
}
|
||||||
use { -- TODO: colors + config
|
use {
|
||||||
'michaelb/sniprun',
|
'michaelb/sniprun',
|
||||||
run = 'bash ./install.sh 1',
|
run = 'bash ./install.sh 1',
|
||||||
cmd = 'SnipRun'
|
cmd = 'SnipRun',
|
||||||
|
config = tools.sniprun_conf
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
'NTBBloodbath/rest.nvim',
|
'NTBBloodbath/rest.nvim',
|
||||||
@ -382,6 +392,6 @@ return require('packer').startup(
|
|||||||
}
|
}
|
||||||
use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking
|
use {'tweekmonster/startuptime.vim', cmd = 'StartupTime'} -- Just for benchmarking
|
||||||
|
|
||||||
-- TODO: dial.nvim, rust-tools.nvim, crates.nvim, go.nvim, clojure-vim/*, vim-pandoc
|
-- TODO: dial.nvim, rust-tools.nvim, crates.nvim, go.nvim, clojure-vim/*, vim-pandoc, nvim-bqf
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user