Compare commits
4 Commits
36806958e1
...
7bdce4f6b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7bdce4f6b8 | ||
|
|
03dc7fbe72 | ||
|
|
0b910f6e49 | ||
|
|
f2d5a10748 |
2
init.lua
2
init.lua
@@ -51,3 +51,5 @@ end
|
|||||||
|
|
||||||
-- setup lsp
|
-- setup lsp
|
||||||
require("config.lsp")
|
require("config.lsp")
|
||||||
|
-- render bufferline
|
||||||
|
require("bufferline").setup{}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
"PDFview": { "branch": "main", "commit": "972dfcce5c0de578865649940f44bf57a700498d" },
|
"PDFview": { "branch": "main", "commit": "972dfcce5c0de578865649940f44bf57a700498d" },
|
||||||
"base16-nvim": { "branch": "master", "commit": "190397833e53fdfd5cf400c5baaf1a4e533158e5" },
|
"base16-nvim": { "branch": "master", "commit": "190397833e53fdfd5cf400c5baaf1a4e533158e5" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
|
"blink.cmp": { "branch": "main", "commit": "451168851e8e2466bc97ee3e026c3dcb9141ce07" },
|
||||||
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
|
"dashboard-nvim": { "branch": "master", "commit": "0775e567b6c0be96d01a61795f7b64c1758262f6" },
|
||||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
"fd": { "branch": "master", "commit": "9d137d358df10c441e51dcacc5899e43a4bee877" },
|
"fd": { "branch": "master", "commit": "9d137d358df10c441e51dcacc5899e43a4bee877" },
|
||||||
"fzf-lua": { "branch": "main", "commit": "8a79ee54d6216d10b2f153921a12b152be0c1a20" },
|
"fzf-lua": { "branch": "main", "commit": "8a79ee54d6216d10b2f153921a12b152be0c1a20" },
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
venus@fw16-btw.84990:1774329150
|
|
||||||
44
lua/plugins/dashboard.lua
Normal file
44
lua/plugins/dashboard.lua
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
return {
|
||||||
|
'nvimdev/dashboard-nvim',
|
||||||
|
event = 'VimEnter',
|
||||||
|
lazy = false,
|
||||||
|
config = function()
|
||||||
|
require('dashboard').setup(
|
||||||
|
{
|
||||||
|
theme = 'hyper',
|
||||||
|
config = {
|
||||||
|
week_header = {
|
||||||
|
enable = true,
|
||||||
|
},
|
||||||
|
project = {
|
||||||
|
enable = false,
|
||||||
|
},
|
||||||
|
shortcut = {
|
||||||
|
{ desc = ' Update', group = '@property', action = 'Lazy update', key = 'u' },
|
||||||
|
{
|
||||||
|
icon = ' ',
|
||||||
|
icon_hl = '@variable',
|
||||||
|
desc = 'Files',
|
||||||
|
group = 'Label',
|
||||||
|
action = 'Telescope find_files',
|
||||||
|
key = 'f',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
desc = ' file manager',
|
||||||
|
group = 'Label',
|
||||||
|
action = 'NvimTreeOpen',
|
||||||
|
key = 'e',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon = '',
|
||||||
|
desc = ' Quit',
|
||||||
|
group = 'Label',
|
||||||
|
action = 'quitall',
|
||||||
|
key = 'q',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
dependencies = { {'nvim-tree/nvim-web-devicons'}}
|
||||||
|
}
|
||||||
49
lua/plugins/lazy-plugins.lua
Normal file
49
lua/plugins/lazy-plugins.lua
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/trouble.nvim",
|
||||||
|
cmd = { "Trouble" },
|
||||||
|
opts = {
|
||||||
|
modes = {
|
||||||
|
lsp = {
|
||||||
|
win = { position = "right" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
||||||
|
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
||||||
|
{ "<leader>cs", "<cmd>Trouble symbols toggle<cr>", desc = "Symbols (Trouble)" },
|
||||||
|
{ "<leader>cS", "<cmd>Trouble lsp toggle<cr>", desc = "LSP references/definitions/... (Trouble)" },
|
||||||
|
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
|
||||||
|
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
|
||||||
|
{
|
||||||
|
"[q",
|
||||||
|
function()
|
||||||
|
if require("trouble").is_open() then
|
||||||
|
require("trouble").prev({ skip_groups = true, jump = true })
|
||||||
|
else
|
||||||
|
local ok, err = pcall(vim.cmd.cprev)
|
||||||
|
if not ok then
|
||||||
|
vim.notify(err, vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
desc = "Previous Trouble/Quickfix Item",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"]q",
|
||||||
|
function()
|
||||||
|
if require("trouble").is_open() then
|
||||||
|
require("trouble").next({ skip_groups = true, jump = true })
|
||||||
|
else
|
||||||
|
local ok, err = pcall(vim.cmd.cnext)
|
||||||
|
if not ok then
|
||||||
|
vim.notify(err, vim.log.levels.ERROR)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
desc = "Next Trouble/Quickfix Item",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -1,64 +1,90 @@
|
|||||||
return { -- adds more detailed bar below the pane
|
return { -- adds more detailed bar below the pane
|
||||||
|
{
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||||
config = function()
|
config = function()
|
||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = 'auto',
|
theme = 'auto',
|
||||||
component_separators = { left = '', right = ''},
|
component_separators = { left = '', right = ''},
|
||||||
section_separators = { left = '', right = ''},
|
section_separators = { left = '', right = ''},
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = {},
|
statusline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
},
|
|
||||||
ignore_focus = {},
|
|
||||||
always_divide_middle = true,
|
|
||||||
always_show_tabline = true,
|
|
||||||
globalstatus = false,
|
|
||||||
refresh = {
|
|
||||||
statusline = 1000,
|
|
||||||
tabline = 1000,
|
|
||||||
winbar = 1000,
|
|
||||||
refresh_time = 16, -- ~60fps
|
|
||||||
events = {
|
|
||||||
'WinEnter',
|
|
||||||
'BufEnter',
|
|
||||||
'BufWritePost',
|
|
||||||
'SessionLoadPost',
|
|
||||||
'FileChangedShellPost',
|
|
||||||
'VimResized',
|
|
||||||
'Filetype',
|
|
||||||
'CursorMoved',
|
|
||||||
'CursorMovedI',
|
|
||||||
'ModeChanged',
|
|
||||||
},
|
},
|
||||||
|
ignore_focus = {},
|
||||||
|
always_divide_middle = true,
|
||||||
|
always_show_tabline = true,
|
||||||
|
globalstatus = false,
|
||||||
|
refresh = {
|
||||||
|
statusline = 1000,
|
||||||
|
tabline = 1000,
|
||||||
|
winbar = 1000,
|
||||||
|
refresh_time = 16, -- ~60fps
|
||||||
|
events = {
|
||||||
|
'WinEnter',
|
||||||
|
'BufEnter',
|
||||||
|
'BufWritePost',
|
||||||
|
'SessionLoadPost',
|
||||||
|
'FileChangedShellPost',
|
||||||
|
'VimResized',
|
||||||
|
'Filetype',
|
||||||
|
'CursorMoved',
|
||||||
|
'CursorMovedI',
|
||||||
|
'ModeChanged',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sections = {
|
||||||
|
lualine_a = {'mode', 'lsp_status'},
|
||||||
|
lualine_b = {'branch', 'diff', 'diagnostics'},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
-- lualine_d = {'tabs', 'windows'},
|
||||||
|
lualine_x = {'searchcount', 'selectioncount', 'fileformat', 'filetype'},
|
||||||
|
lualine_y = {'progress', 'location'},
|
||||||
|
lualine_z = {{'datetime', style = "%m/%d %H:%M"}}
|
||||||
|
},
|
||||||
|
inactive_sections = {
|
||||||
|
lualine_a = {},
|
||||||
|
lualine_b = {},
|
||||||
|
lualine_c = {'filename'},
|
||||||
|
lualine_x = {'location'},
|
||||||
|
lualine_y = {},
|
||||||
|
lualine_z = {}
|
||||||
|
},
|
||||||
|
tabline = {
|
||||||
|
-- lualine_a = {'filename'}
|
||||||
|
},
|
||||||
|
winbar = {},
|
||||||
|
inactive_winbar = {},
|
||||||
|
extensions = {}
|
||||||
}
|
}
|
||||||
|
end
|
||||||
},
|
},
|
||||||
sections = {
|
{
|
||||||
lualine_a = {'mode', 'lsp_status'},
|
'akinsho/bufferline.nvim',
|
||||||
lualine_b = {'branch', 'diff', 'diagnostics'},
|
version = "*",
|
||||||
lualine_c = {'filename'},
|
dependencies = 'nvim-tree/nvim-web-devicons',
|
||||||
-- lualine_d = {'tabs', 'windows'},
|
config = function()
|
||||||
lualine_x = {'searchcount', 'selectioncount', 'fileformat', 'filetype'},
|
local bufferline = require('bufferline')
|
||||||
lualine_y = {'progress', 'location'},
|
bufferline.setup{
|
||||||
lualine_z = {{'datetime', style = "%m/%d %H:%M"}}
|
options = {
|
||||||
|
themable = true,
|
||||||
|
numbers = "buffer_id",
|
||||||
|
indicator = {
|
||||||
|
icon = '▎', -- this should be omitted if indicator style is not 'icon'
|
||||||
|
style = 'icon',
|
||||||
|
},
|
||||||
|
buffer_close_icon = '',
|
||||||
|
modified_icon = '● ',
|
||||||
|
close_icon = ' ',
|
||||||
|
left_trunc_marker = ' ',
|
||||||
|
right_trunc_marker = ' ',
|
||||||
|
diagnostics = "nvim_lsp",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
|
||||||
lualine_a = {},
|
|
||||||
lualine_b = {},
|
|
||||||
lualine_c = {'filename'},
|
|
||||||
lualine_x = {'location'},
|
|
||||||
lualine_y = {},
|
|
||||||
lualine_z = {}
|
|
||||||
},
|
|
||||||
tabline = {
|
|
||||||
-- lualine_a = {'filename'}
|
|
||||||
},
|
|
||||||
winbar = {},
|
|
||||||
inactive_winbar = {},
|
|
||||||
extensions = {}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
return {
|
|
||||||
"folke/trouble.nvim",
|
|
||||||
cmd = { "Trouble" },
|
|
||||||
opts = {
|
|
||||||
modes = {
|
|
||||||
lsp = {
|
|
||||||
win = { position = "right" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
keys = {
|
|
||||||
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Diagnostics (Trouble)" },
|
|
||||||
{ "<leader>xX", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", desc = "Buffer Diagnostics (Trouble)" },
|
|
||||||
{ "<leader>cs", "<cmd>Trouble symbols toggle<cr>", desc = "Symbols (Trouble)" },
|
|
||||||
{ "<leader>cS", "<cmd>Trouble lsp toggle<cr>", desc = "LSP references/definitions/... (Trouble)" },
|
|
||||||
{ "<leader>xL", "<cmd>Trouble loclist toggle<cr>", desc = "Location List (Trouble)" },
|
|
||||||
{ "<leader>xQ", "<cmd>Trouble qflist toggle<cr>", desc = "Quickfix List (Trouble)" },
|
|
||||||
{
|
|
||||||
"[q",
|
|
||||||
function()
|
|
||||||
if require("trouble").is_open() then
|
|
||||||
require("trouble").prev({ skip_groups = true, jump = true })
|
|
||||||
else
|
|
||||||
local ok, err = pcall(vim.cmd.cprev)
|
|
||||||
if not ok then
|
|
||||||
vim.notify(err, vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "Previous Trouble/Quickfix Item",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"]q",
|
|
||||||
function()
|
|
||||||
if require("trouble").is_open() then
|
|
||||||
require("trouble").next({ skip_groups = true, jump = true })
|
|
||||||
else
|
|
||||||
local ok, err = pcall(vim.cmd.cnext)
|
|
||||||
if not ok then
|
|
||||||
vim.notify(err, vim.log.levels.ERROR)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
desc = "Next Trouble/Quickfix Item",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user