mirror of
https://github.com/CompeyDev/my-nvim-setup.git
synced 2025-01-06 01:59:08 +00:00
apply fmt
This commit is contained in:
parent
02a69964d1
commit
7f5fbbf08b
28 changed files with 1584 additions and 1606 deletions
12
filetype.lua
12
filetype.lua
|
@ -1,6 +1,6 @@
|
||||||
vim.filetype.add({
|
vim.filetype.add {
|
||||||
extension = {
|
extension = {
|
||||||
mdx = "mdx",
|
mdx = "mdx",
|
||||||
luau = "luau"
|
luau = "luau",
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
|
|
50
init.lua
50
init.lua
|
@ -1,38 +1,38 @@
|
||||||
-- Basic settings
|
-- Basic settings
|
||||||
require("basic")
|
require "basic"
|
||||||
|
|
||||||
-- Load plugins
|
-- Load plugins
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system {
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
}
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
vim.g.mapleader = require("custom_keys").leader
|
vim.g.mapleader = require("custom_keys").leader
|
||||||
vim.g.maplocalleader = "\\"
|
vim.g.maplocalleader = "\\"
|
||||||
|
|
||||||
require("lazy").setup({
|
require("lazy").setup {
|
||||||
spec = {
|
spec = {
|
||||||
{ import = "plugins" },
|
{ import = "plugins" },
|
||||||
{ import = "languages" },
|
{ import = "languages" },
|
||||||
{ import = "my_plugins" },
|
{ import = "my_plugins" },
|
||||||
},
|
},
|
||||||
ui = {
|
ui = {
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
},
|
},
|
||||||
change_detection = {
|
change_detection = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
notify = false, -- get a notification when changes are found
|
notify = false, -- get a notification when changes are found
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
|
|
||||||
-- Final settings
|
-- Final settings
|
||||||
require("core")
|
require "core"
|
||||||
pcall(require, "custom")
|
pcall(require, "custom")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
HOME = os.getenv("HOME")
|
HOME = os.getenv "HOME"
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.opt.cursorline = true
|
vim.opt.cursorline = true
|
||||||
|
@ -62,7 +62,7 @@ vim.opt.swapfile = false -- do not use swap file
|
||||||
-- Commands mode
|
-- Commands mode
|
||||||
vim.opt.wildmenu = true -- on TAB, complete options for system command
|
vim.opt.wildmenu = true -- on TAB, complete options for system command
|
||||||
vim.opt.wildignore =
|
vim.opt.wildignore =
|
||||||
"deps,.svn,CVS,.git,.hg,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif,.DS_Store,*.aux,*.out,*.toc"
|
"deps,.svn,CVS,.git,.hg,*.o,*.a,*.class,*.mo,*.la,*.so,*.obj,*.swp,*.jpg,*.png,*.xpm,*.gif,.DS_Store,*.aux,*.out,*.toc"
|
||||||
|
|
||||||
-- Only show cursorline in the current window and in normal mode.
|
-- Only show cursorline in the current window and in normal mode.
|
||||||
-- vim.cmd([[
|
-- vim.cmd([[
|
||||||
|
@ -75,11 +75,11 @@ vim.opt.wildignore =
|
||||||
-- augroup END
|
-- augroup END
|
||||||
-- ]])
|
-- ]])
|
||||||
|
|
||||||
vim.cmd([[
|
vim.cmd [[
|
||||||
set noeb
|
set noeb
|
||||||
set t_Co=256
|
set t_Co=256
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
exec "nohlsearch"
|
exec "nohlsearch"
|
||||||
syntax enable
|
syntax enable
|
||||||
syntax on
|
syntax on
|
||||||
]])
|
]]
|
||||||
|
|
206
lua/core.lua
206
lua/core.lua
|
@ -1,152 +1,128 @@
|
||||||
local keys = require("custom_keys")
|
local keys = require "custom_keys"
|
||||||
local opts = require("custom_opts")
|
local opts = require "custom_opts"
|
||||||
|
|
||||||
-- Setup keymapping
|
-- Setup keymapping
|
||||||
local function set_keymap()
|
local function set_keymap()
|
||||||
local map = vim.keymap.set
|
local map = vim.keymap.set
|
||||||
local option = { noremap = true, silent = true }
|
local option = { noremap = true, silent = true }
|
||||||
|
|
||||||
vim.o.guifont = "CaskaydiaCove Nerd Font Mono:h13"
|
vim.o.guifont = "CaskaydiaCove Nerd Font Mono:h13"
|
||||||
|
|
||||||
map("n", keys.jump_left_window, "<C-W>h", option)
|
map("n", keys.jump_left_window, "<C-W>h", option)
|
||||||
map("n", keys.jump_down_window, "<C-W>j", option)
|
map("n", keys.jump_down_window, "<C-W>j", option)
|
||||||
map("n", keys.jump_up_window, "<C-W>k", option)
|
map("n", keys.jump_up_window, "<C-W>k", option)
|
||||||
map("n", keys.jump_right_window, "<C-W>l", option)
|
map("n", keys.jump_right_window, "<C-W>l", option)
|
||||||
|
|
||||||
vim.cmd([[
|
vim.cmd [[
|
||||||
" press esc to cancel search highlight
|
" press esc to cancel search highlight
|
||||||
nnoremap <silent> <Esc> :nohlsearch<CR>:echo<CR>
|
nnoremap <silent> <Esc> :nohlsearch<CR>:echo<CR>
|
||||||
]])
|
]]
|
||||||
|
|
||||||
-- Remove the `~` for blank lines by setting its color to be the same as background
|
-- Remove the `~` for blank lines by setting its color to be the same as background
|
||||||
vim.cmd("hi NonText guifg=bg")
|
vim.cmd "hi NonText guifg=bg"
|
||||||
|
|
||||||
-- for markdown file
|
-- for markdown file
|
||||||
vim.cmd([[
|
vim.cmd [[
|
||||||
" optimized up and down move when set wrap for markdown file
|
" optimized up and down move when set wrap for markdown file
|
||||||
autocmd FileType markdown noremap <buffer> j gj
|
autocmd FileType markdown noremap <buffer> j gj
|
||||||
autocmd FileType markdown noremap <buffer> k gk
|
autocmd FileType markdown noremap <buffer> k gk
|
||||||
autocmd FileType markdown setlocal wrap
|
autocmd FileType markdown setlocal wrap
|
||||||
]])
|
]]
|
||||||
|
|
||||||
-- Supported by bufdelete
|
-- Supported by bufdelete
|
||||||
vim.cmd([[
|
vim.cmd [[
|
||||||
cnoreabbrev bdelete Bdelete
|
cnoreabbrev bdelete Bdelete
|
||||||
cnoreabbrev bdelete! Bdelete!
|
cnoreabbrev bdelete! Bdelete!
|
||||||
cnoreabbrev bwipeout Bwipeout
|
cnoreabbrev bwipeout Bwipeout
|
||||||
cnoreabbrev bwipeout! Bwipeout!
|
cnoreabbrev bwipeout! Bwipeout!
|
||||||
]])
|
]]
|
||||||
|
|
||||||
-- Supported by bufferline
|
-- Supported by bufferline
|
||||||
map("n", keys.pick_tab, ":BufferLinePick<CR>", option)
|
map("n", keys.pick_tab, ":BufferLinePick<CR>", option)
|
||||||
|
|
||||||
-- Supported by nvim-tree
|
-- Supported by nvim-tree
|
||||||
map("n", keys.file_explorer, ":Neotree position=left source=filesystem action=show toggle=true<CR>", option)
|
map("n", keys.file_explorer, ":Neotree position=left source=filesystem action=show toggle=true<CR>", option)
|
||||||
map("n", keys.git_status, ":Neotree position=float source=git_status action=show toggle=true<CR>", option)
|
map("n", keys.git_status, ":Neotree position=float source=git_status action=show toggle=true<CR>", option)
|
||||||
|
|
||||||
-- Supported by aerial
|
-- Supported by aerial
|
||||||
map("n", keys.outline, ":AerialToggle! right<CR>", option)
|
map("n", keys.outline, ":AerialToggle! right<CR>", option)
|
||||||
|
|
||||||
-- Supported by diffview
|
-- Supported by diffview
|
||||||
map("n", keys.diff_open, ":DiffviewOpen<CR>", option)
|
map("n", keys.diff_open, ":DiffviewOpen<CR>", option)
|
||||||
map("n", keys.diff_close, ":DiffviewClose<CR>", option)
|
map("n", keys.diff_close, ":DiffviewClose<CR>", option)
|
||||||
|
|
||||||
-- Supported by toggleterm
|
-- Supported by toggleterm
|
||||||
-- float terminal
|
-- float terminal
|
||||||
local float_terminal_default = require("toggleterm.terminal").Terminal:new({
|
local float_terminal_default = require("toggleterm.terminal").Terminal:new {
|
||||||
direction = "float",
|
direction = "float",
|
||||||
on_open = function(term)
|
on_open = function(term)
|
||||||
-- forced to change the working dir for terminal
|
-- forced to change the working dir for terminal
|
||||||
-- This will solve the problem of not updating the directory when switching sessions.
|
-- This will solve the problem of not updating the directory when switching sessions.
|
||||||
local cwd = vim.fn.getcwd()
|
local cwd = vim.fn.getcwd()
|
||||||
if cwd ~= term.dir then
|
if cwd ~= term.dir then
|
||||||
term:change_dir(cwd)
|
term:change_dir(cwd)
|
||||||
end
|
end
|
||||||
-- when float term opened, disable bottom terminal
|
-- when float term opened, disable bottom terminal
|
||||||
vim.api.nvim_del_keymap("t", keys.terminal_bottom)
|
vim.api.nvim_del_keymap("t", keys.terminal_bottom)
|
||||||
vim.cmd("startinsert!")
|
vim.cmd "startinsert!"
|
||||||
end,
|
end,
|
||||||
on_close = function(t, job, exit_code, name)
|
on_close = function(t, job, exit_code, name)
|
||||||
-- when float term closed, enable bottom terminal
|
-- when float term closed, enable bottom terminal
|
||||||
map("t", keys.terminal_bottom, "<C-\\><C-n>:lua _bottom_term_toggle()<CR>", option)
|
map("t", keys.terminal_bottom, "<C-\\><C-n>:lua _bottom_term_toggle()<CR>", option)
|
||||||
end,
|
end,
|
||||||
})
|
}
|
||||||
function _float_term_toggle()
|
function _float_term_toggle()
|
||||||
float_terminal_default:toggle()
|
float_terminal_default:toggle()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- bottom terminal
|
-- bottom terminal
|
||||||
local bottom_terminal_default = require("toggleterm.terminal").Terminal:new({
|
local bottom_terminal_default = require("toggleterm.terminal").Terminal:new {
|
||||||
direction = "horizontal",
|
direction = "horizontal",
|
||||||
on_open = function(term)
|
on_open = function(term)
|
||||||
-- forced to change the working dir for terminal
|
-- forced to change the working dir for terminal
|
||||||
-- This will solve the problem of not updating the directory when switching sessions.
|
-- This will solve the problem of not updating the directory when switching sessions.
|
||||||
local cwd = vim.fn.getcwd()
|
local cwd = vim.fn.getcwd()
|
||||||
if cwd ~= term.dir then
|
if cwd ~= term.dir then
|
||||||
term:change_dir(cwd)
|
term:change_dir(cwd)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- set keymapping
|
-- set keymapping
|
||||||
local opts = { buffer = 0 }
|
local opts = { buffer = 0 }
|
||||||
vim.api.nvim_buf_set_keymap(
|
vim.api.nvim_buf_set_keymap(term.bufnr, "t", "<C-h>", [[<Cmd>wincmd h<CR>]], { noremap = true, silent = true })
|
||||||
term.bufnr,
|
vim.api.nvim_buf_set_keymap(term.bufnr, "t", "<C-j>", [[<Cmd>wincmd j<CR>]], { noremap = true, silent = true })
|
||||||
"t",
|
vim.api.nvim_buf_set_keymap(term.bufnr, "t", "<C-k>", [[<Cmd>wincmd k<CR>]], { noremap = true, silent = true })
|
||||||
"<C-h>",
|
vim.api.nvim_buf_set_keymap(term.bufnr, "t", "<C-l>", [[<Cmd>wincmd l<CR>]], { noremap = true, silent = true })
|
||||||
[[<Cmd>wincmd h<CR>]],
|
vim.cmd "startinsert!"
|
||||||
{ noremap = true, silent = true }
|
end,
|
||||||
)
|
on_exit = function(t, job, exit_code, name)
|
||||||
vim.api.nvim_buf_set_keymap(
|
vim.cmd "quit!"
|
||||||
term.bufnr,
|
end,
|
||||||
"t",
|
}
|
||||||
"<C-j>",
|
function _bottom_term_toggle()
|
||||||
[[<Cmd>wincmd j<CR>]],
|
bottom_terminal_default:toggle()
|
||||||
{ noremap = true, silent = true }
|
end
|
||||||
)
|
|
||||||
vim.api.nvim_buf_set_keymap(
|
|
||||||
term.bufnr,
|
|
||||||
"t",
|
|
||||||
"<C-k>",
|
|
||||||
[[<Cmd>wincmd k<CR>]],
|
|
||||||
{ noremap = true, silent = true }
|
|
||||||
)
|
|
||||||
vim.api.nvim_buf_set_keymap(
|
|
||||||
term.bufnr,
|
|
||||||
"t",
|
|
||||||
"<C-l>",
|
|
||||||
[[<Cmd>wincmd l<CR>]],
|
|
||||||
{ noremap = true, silent = true }
|
|
||||||
)
|
|
||||||
vim.cmd("startinsert!")
|
|
||||||
end,
|
|
||||||
on_exit = function(t, job, exit_code, name)
|
|
||||||
vim.cmd("quit!")
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
function _bottom_term_toggle()
|
|
||||||
bottom_terminal_default:toggle()
|
|
||||||
end
|
|
||||||
|
|
||||||
map("n", keys.terminal_float, ":lua _float_term_toggle()<CR>", option)
|
map("n", keys.terminal_float, ":lua _float_term_toggle()<CR>", option)
|
||||||
map("t", keys.terminal_float, "<C-\\><C-n>:lua _float_term_toggle()<CR>", option)
|
map("t", keys.terminal_float, "<C-\\><C-n>:lua _float_term_toggle()<CR>", option)
|
||||||
map("n", keys.terminal_bottom, ":lua _bottom_term_toggle()<CR>", option)
|
map("n", keys.terminal_bottom, ":lua _bottom_term_toggle()<CR>", option)
|
||||||
map("t", keys.terminal_bottom, "<C-\\><C-n>:lua _bottom_term_toggle()<CR>", option)
|
map("t", keys.terminal_bottom, "<C-\\><C-n>:lua _bottom_term_toggle()<CR>", option)
|
||||||
|
|
||||||
vim.cmd([[
|
vim.cmd [[
|
||||||
command! Termfloat :lua _float_term_toggle()
|
command! Termfloat :lua _float_term_toggle()
|
||||||
]])
|
]]
|
||||||
vim.cmd([[cnoreabbrev terminal Termfloat]])
|
vim.cmd [[cnoreabbrev terminal Termfloat]]
|
||||||
|
|
||||||
-- Supported by nvim-session-manager
|
-- Supported by nvim-session-manager
|
||||||
map("n", keys.switch_session, ":SessionManager load_session<CR>", option)
|
map("n", keys.switch_session, ":SessionManager load_session<CR>", option)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set up transparency
|
-- Set up transparency
|
||||||
local function set_transparency()
|
local function set_transparency()
|
||||||
local transparency = opts.window_transparency
|
local transparency = opts.window_transparency
|
||||||
-- Setup global transparency for float window.
|
-- Setup global transparency for float window.
|
||||||
vim.api.nvim_command(string.format("autocmd FileType * set winblend=%d", transparency))
|
vim.api.nvim_command(string.format("autocmd FileType * set winblend=%d", transparency))
|
||||||
-- Setup global transparency for popup menu.
|
-- Setup global transparency for popup menu.
|
||||||
vim.o.pumblend = transparency
|
vim.o.pumblend = transparency
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Set up auto command
|
-- Set up auto command
|
||||||
|
|
|
@ -2,69 +2,69 @@
|
||||||
-- You can edit the default settings of the shortcut keys here
|
-- You can edit the default settings of the shortcut keys here
|
||||||
--
|
--
|
||||||
return {
|
return {
|
||||||
-- The default '<leader>' is the space.
|
-- The default '<leader>' is the space.
|
||||||
leader = " ",
|
leader = " ",
|
||||||
|
|
||||||
-- Use the shortcut to switch/jump window.
|
-- Use the shortcut to switch/jump window.
|
||||||
jump_left_window = "<C-h>",
|
jump_left_window = "<C-h>",
|
||||||
jump_right_window = "<C-l>",
|
jump_right_window = "<C-l>",
|
||||||
jump_up_window = "<C-k>",
|
jump_up_window = "<C-k>",
|
||||||
jump_down_window = "<C-j>",
|
jump_down_window = "<C-j>",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/akinsho/bufferline.nvim
|
-- View other usage of the plugin: https://github.com/akinsho/bufferline.nvim
|
||||||
-- Use the shortcut to pick a buffer tab.
|
-- Use the shortcut to pick a buffer tab.
|
||||||
pick_tab = "<leader>tt",
|
pick_tab = "<leader>tt",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/nvim-neo-tree/neo-tree.nvim
|
-- View other usage of the plugin: https://github.com/nvim-neo-tree/neo-tree.nvim
|
||||||
-- Use the shortcut to open or close file explorer.
|
-- Use the shortcut to open or close file explorer.
|
||||||
file_explorer = "<F9>",
|
file_explorer = "<F9>",
|
||||||
-- Use the shortcut to open or close git status on a float window.
|
-- Use the shortcut to open or close git status on a float window.
|
||||||
git_status = "<F8>",
|
git_status = "<F8>",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/stevearc/aerial.nvim
|
-- View other usage of the plugin: https://github.com/stevearc/aerial.nvim
|
||||||
-- Use the shortcut to open or close the outline, it need to call the lsp server.
|
-- Use the shortcut to open or close the outline, it need to call the lsp server.
|
||||||
outline = "<F7>",
|
outline = "<F7>",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/akinsho/toggleterm.nvim
|
-- View other usage of the plugin: https://github.com/akinsho/toggleterm.nvim
|
||||||
-- Use the shortcut to open or close the terminal.
|
-- Use the shortcut to open or close the terminal.
|
||||||
terminal_float = "<A-u>", -- open terminal in a float window
|
terminal_float = "<A-u>", -- open terminal in a float window
|
||||||
terminal_bottom = "<A-b>", -- open terminal at the bottom
|
terminal_bottom = "<A-b>", -- open terminal at the bottom
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/Shatur/neovim-session-manager
|
-- View other usage of the plugin: https://github.com/Shatur/neovim-session-manager
|
||||||
-- Use the shortcut to switch a session.
|
-- Use the shortcut to switch a session.
|
||||||
switch_session = "<leader>ss",
|
switch_session = "<leader>ss",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/nvim-telescope/telescope.nvim
|
-- View other usage of the plugin: https://github.com/nvim-telescope/telescope.nvim
|
||||||
-- Use the shortcut to find, search files and find buffers.
|
-- Use the shortcut to find, search files and find buffers.
|
||||||
find_files = "<leader>ff",
|
find_files = "<leader>ff",
|
||||||
live_grep = "<leader>gg",
|
live_grep = "<leader>gg",
|
||||||
search_cursor = "<leader>cc",
|
search_cursor = "<leader>cc",
|
||||||
find_buffer = "<leader>bb",
|
find_buffer = "<leader>bb",
|
||||||
-- Use the to close telescope window. <C-c> is the default setting, can't edit it here.
|
-- Use the to close telescope window. <C-c> is the default setting, can't edit it here.
|
||||||
-- close_telescope = "<C-c>",
|
-- close_telescope = "<C-c>",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/sindrets/diffview.nvim
|
-- View other usage of the plugin: https://github.com/sindrets/diffview.nvim
|
||||||
-- Use the shortcut to open 'git diff'.
|
-- Use the shortcut to open 'git diff'.
|
||||||
diff_open = "<leader>df",
|
diff_open = "<leader>df",
|
||||||
-- Use the shortcut to close 'git diff'.
|
-- Use the shortcut to close 'git diff'.
|
||||||
diff_close = "<leader>dc",
|
diff_close = "<leader>dc",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/mrjones2014/smart-splits.nvim
|
-- View other usage of the plugin: https://github.com/mrjones2014/smart-splits.nvim
|
||||||
-- Use the shortcut to resize the window, <control + alt + hjkl>
|
-- Use the shortcut to resize the window, <control + alt + hjkl>
|
||||||
resize_left = "<C-A-h>",
|
resize_left = "<C-A-h>",
|
||||||
resize_down = "<C-A-j>",
|
resize_down = "<C-A-j>",
|
||||||
resize_up = "<C-A-k>",
|
resize_up = "<C-A-k>",
|
||||||
resize_right = "<C-A-l>",
|
resize_right = "<C-A-l>",
|
||||||
|
|
||||||
-- View other usage of the plugin: https://github.com/neovim/nvim-lspconfig
|
-- View other usage of the plugin: https://github.com/neovim/nvim-lspconfig
|
||||||
-- Goto
|
-- Goto
|
||||||
goto_definition = "gd",
|
goto_definition = "gd",
|
||||||
goto_references = "gr",
|
goto_references = "gr",
|
||||||
goto_declaration = "gD",
|
goto_declaration = "gD",
|
||||||
goto_impl = "gi",
|
goto_impl = "gi",
|
||||||
-- goto_back = "<C-o>",
|
-- goto_back = "<C-o>",
|
||||||
-- Use the shortcut to rename the code symbols.
|
-- Use the shortcut to rename the code symbols.
|
||||||
lsp_rename = "<leader>re",
|
lsp_rename = "<leader>re",
|
||||||
-- Use the shortcut to format your codes.
|
-- Use the shortcut to format your codes.
|
||||||
format = "<leader>ft",
|
format = "<leader>ft",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
local function strsplit(inputstr, sep)
|
local function strsplit(inputstr, sep)
|
||||||
if sep == nil then
|
if sep == nil then
|
||||||
sep = "%s"
|
sep = "%s"
|
||||||
end
|
end
|
||||||
local t={}
|
local t = {}
|
||||||
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
|
for str in string.gmatch(inputstr, "([^" .. sep .. "]+)") do
|
||||||
table.insert(t, str)
|
table.insert(t, str)
|
||||||
end
|
end
|
||||||
return t
|
return t
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
file_explorer_title = "🥷 File Explorer",
|
file_explorer_title = "🥷 File Explorer",
|
||||||
tab_style = "thin", -- options: thin, thick, slope, slant
|
tab_style = "thin", -- options: thin, thick, slope, slant
|
||||||
terminal_size = 0.7, -- control the float terminal only
|
terminal_size = 0.7, -- control the float terminal only
|
||||||
window_transparency = 0,
|
window_transparency = 0,
|
||||||
auto_open_outline = false, -- options: true, false
|
auto_open_outline = false, -- options: true, false
|
||||||
cmdline_view = "cmdline", -- options: cmdline, cmdline_popup
|
cmdline_view = "cmdline", -- options: cmdline, cmdline_popup
|
||||||
close_message_notify = false,
|
close_message_notify = false,
|
||||||
|
|
||||||
-- Starting screen header.
|
-- Starting screen header.
|
||||||
home_header =
|
home_header = strsplit(
|
||||||
strsplit([[
|
[[
|
||||||
⢀⠀⢀⣀⣠⣤⣤⣤⣤⣤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣠⣠⣤⣤⣤⣤⣀⠲⢦⣄⡀⠀⠀
|
⢀⠀⢀⣀⣠⣤⣤⣤⣤⣤⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣠⣠⣤⣤⣤⣤⣀⠲⢦⣄⡀⠀⠀
|
||||||
⡶⢟⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠰⣷⣷⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣬⡛⢷⣔
|
⡶⢟⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⡀⠀⠀⠀⠀⠀⠰⣷⣷⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣬⡛⢷⣔
|
||||||
⣾⡿⠟⠋⠉⠁⠀⡀⠀⠀⠀⠀⠈⠉⠉⠙⠛⢻⠛⠛⠋⠀⠀⠀⠀⠀⠀⠀⠈⠙⢛⣛⣛⣛⣛⣉⢉⣉⡀⠀⠀⠀⠀⠀⠈⠉⠛⢿⣷⣝
|
⣾⡿⠟⠋⠉⠁⠀⡀⠀⠀⠀⠀⠈⠉⠉⠙⠛⢻⠛⠛⠋⠀⠀⠀⠀⠀⠀⠀⠈⠙⢛⣛⣛⣛⣛⣉⢉⣉⡀⠀⠀⠀⠀⠀⠈⠉⠛⢿⣷⣝
|
||||||
|
@ -40,5 +40,7 @@ return {
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠟⠛⠛⠛⠛⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⠀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠟⠛⠛⠛⠛⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⠇⠀⠀⠀⠀⠀⠀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⠀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⠀⠀⠀⠀⠀⠀⠀
|
||||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠋⠀⠀⠀⠀⠀⠀⠀
|
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⠋⠀⠀⠀⠀⠀⠀⠀
|
||||||
]], "\n")
|
]],
|
||||||
|
"\n"
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,23 +1,23 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"ray-x/go.nvim",
|
"ray-x/go.nvim",
|
||||||
dependencies = { -- optional packages
|
dependencies = { -- optional packages
|
||||||
"ray-x/guihua.lua",
|
"ray-x/guihua.lua",
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("go").setup({
|
require("go").setup {
|
||||||
run_in_floaterm = true,
|
run_in_floaterm = true,
|
||||||
floaterm = {
|
floaterm = {
|
||||||
posititon = "center", -- one of {`top`, `bottom`, `left`, `right`, `center`, `auto`}
|
posititon = "center", -- one of {`top`, `bottom`, `left`, `right`, `center`, `auto`}
|
||||||
width = 0.45, -- width of float window if not auto
|
width = 0.45, -- width of float window if not auto
|
||||||
height = 0.98, -- height of float window if not auto
|
height = 0.98, -- height of float window if not auto
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
event = { "CmdlineEnter" },
|
event = { "CmdlineEnter" },
|
||||||
ft = { "go", "gomod" },
|
ft = { "go", "gomod" },
|
||||||
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
|
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +1,37 @@
|
||||||
return {
|
return {
|
||||||
"lopi-py/luau-lsp.nvim",
|
"lopi-py/luau-lsp.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
require("luau-lsp").setup({
|
require("luau-lsp").setup {
|
||||||
fflags = {
|
fflags = {
|
||||||
sync = true, -- sync currently enabled fflags with roblox's published fflags
|
sync = true, -- sync currently enabled fflags with roblox's published fflags
|
||||||
override = {
|
override = {
|
||||||
DebugLuauDeferredConstraintResolution = true,
|
DebugLuauDeferredConstraintResolution = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
server = {
|
server = {
|
||||||
settings = {
|
settings = {
|
||||||
-- https://github.com/folke/neoconf.nvim/blob/main/schemas/luau_lsp.json
|
-- https://github.com/folke/neoconf.nvim/blob/main/schemas/luau_lsp.json
|
||||||
["luau-lsp"] = {
|
["luau-lsp"] = {
|
||||||
require = {
|
require = {
|
||||||
mode = "relativeToFile",
|
mode = "relativeToFile",
|
||||||
directoryAliases = { ["@lune"] = "~/.lune/.typedefs/0.8.0/" },
|
directoryAliases = { ["@lune"] = "~/.lune/.typedefs/0.8.0/" },
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
imports = {
|
imports = {
|
||||||
enabled = true, -- enable auto imports
|
enabled = true, -- enable auto imports
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
types = {
|
types = {
|
||||||
roblox = false,
|
roblox = false,
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
build = function()
|
build = function()
|
||||||
vim.fn["mkdp#util#install"]()
|
vim.fn["mkdp#util#install"]()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,184 +1,184 @@
|
||||||
return {
|
return {
|
||||||
{ 'rust-lang/rust.vim' },
|
{ "rust-lang/rust.vim" },
|
||||||
{
|
{
|
||||||
"simrat39/rust-tools.nvim",
|
"simrat39/rust-tools.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = function()
|
config = function()
|
||||||
local rt = require("rust-tools")
|
local rt = require "rust-tools"
|
||||||
rt.setup({
|
rt.setup {
|
||||||
tools = { -- rust-tools options
|
tools = { -- rust-tools options
|
||||||
|
|
||||||
-- how to execute terminal commands
|
-- how to execute terminal commands
|
||||||
-- options right now: termopen / quickfix
|
-- options right now: termopen / quickfix
|
||||||
executor = require("rust-tools.executors").quickfix,
|
executor = require("rust-tools.executors").quickfix,
|
||||||
|
|
||||||
-- callback to execute once rust-analyzer is done initializing the workspace
|
-- callback to execute once rust-analyzer is done initializing the workspace
|
||||||
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
|
-- The callback receives one parameter indicating the `health` of the server: "ok" | "warning" | "error"
|
||||||
on_initialized = nil,
|
on_initialized = nil,
|
||||||
|
|
||||||
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
|
-- automatically call RustReloadWorkspace when writing to a Cargo.toml file.
|
||||||
reload_workspace_from_cargo_toml = true,
|
reload_workspace_from_cargo_toml = true,
|
||||||
|
|
||||||
-- These apply to the default RustSetInlayHints command
|
-- These apply to the default RustSetInlayHints command
|
||||||
inlay_hints = {
|
inlay_hints = {
|
||||||
-- automatically set inlay hints (type hints)
|
-- automatically set inlay hints (type hints)
|
||||||
-- default: true
|
-- default: true
|
||||||
auto = true,
|
auto = true,
|
||||||
|
|
||||||
-- Only show inlay hints for the current line
|
-- Only show inlay hints for the current line
|
||||||
only_current_line = false,
|
only_current_line = false,
|
||||||
|
|
||||||
-- whether to show parameter hints with the inlay hints or not
|
-- whether to show parameter hints with the inlay hints or not
|
||||||
-- default: true
|
-- default: true
|
||||||
show_parameter_hints = true,
|
show_parameter_hints = true,
|
||||||
|
|
||||||
-- prefix for parameter hints
|
-- prefix for parameter hints
|
||||||
-- default: "<-"
|
-- default: "<-"
|
||||||
parameter_hints_prefix = "<- ",
|
parameter_hints_prefix = "<- ",
|
||||||
|
|
||||||
-- prefix for all the other hints (type, chaining)
|
-- prefix for all the other hints (type, chaining)
|
||||||
-- default: "=>"
|
-- default: "=>"
|
||||||
other_hints_prefix = "=> ",
|
other_hints_prefix = "=> ",
|
||||||
|
|
||||||
-- whether to align to the length of the longest line in the file
|
-- whether to align to the length of the longest line in the file
|
||||||
max_len_align = false,
|
max_len_align = false,
|
||||||
|
|
||||||
-- padding from the left if max_len_align is true
|
-- padding from the left if max_len_align is true
|
||||||
max_len_align_padding = 1,
|
max_len_align_padding = 1,
|
||||||
|
|
||||||
-- whether to align to the extreme right or not
|
-- whether to align to the extreme right or not
|
||||||
right_align = false,
|
right_align = false,
|
||||||
|
|
||||||
-- padding from the right if right_align is true
|
-- padding from the right if right_align is true
|
||||||
right_align_padding = 7,
|
right_align_padding = 7,
|
||||||
|
|
||||||
-- The color of the hints
|
-- The color of the hints
|
||||||
highlight = "Comment",
|
highlight = "Comment",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
|
-- options same as lsp hover / vim.lsp.util.open_floating_preview()
|
||||||
hover_actions = {
|
hover_actions = {
|
||||||
|
|
||||||
-- the border that is used for the hover window
|
-- the border that is used for the hover window
|
||||||
-- see vim.api.nvim_open_win()
|
-- see vim.api.nvim_open_win()
|
||||||
border = {
|
border = {
|
||||||
{ "╭", "FloatBorder" },
|
{ "╭", "FloatBorder" },
|
||||||
{ "─", "FloatBorder" },
|
{ "─", "FloatBorder" },
|
||||||
{ "╮", "FloatBorder" },
|
{ "╮", "FloatBorder" },
|
||||||
{ "│", "FloatBorder" },
|
{ "│", "FloatBorder" },
|
||||||
{ "╯", "FloatBorder" },
|
{ "╯", "FloatBorder" },
|
||||||
{ "─", "FloatBorder" },
|
{ "─", "FloatBorder" },
|
||||||
{ "╰", "FloatBorder" },
|
{ "╰", "FloatBorder" },
|
||||||
{ "│", "FloatBorder" },
|
{ "│", "FloatBorder" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Maximal width of the hover window. Nil means no max.
|
-- Maximal width of the hover window. Nil means no max.
|
||||||
max_width = nil,
|
max_width = nil,
|
||||||
|
|
||||||
-- Maximal height of the hover window. Nil means no max.
|
-- Maximal height of the hover window. Nil means no max.
|
||||||
max_height = nil,
|
max_height = nil,
|
||||||
|
|
||||||
-- whether the hover action window gets automatically focused
|
-- whether the hover action window gets automatically focused
|
||||||
-- default: false
|
-- default: false
|
||||||
auto_focus = false,
|
auto_focus = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- settings for showing the crate graph based on graphviz and the dot
|
-- settings for showing the crate graph based on graphviz and the dot
|
||||||
-- command
|
-- command
|
||||||
crate_graph = {
|
crate_graph = {
|
||||||
-- Backend used for displaying the graph
|
-- Backend used for displaying the graph
|
||||||
-- see: https://graphviz.org/docs/outputs/
|
-- see: https://graphviz.org/docs/outputs/
|
||||||
-- default: x11
|
-- default: x11
|
||||||
backend = "x11",
|
backend = "x11",
|
||||||
-- where to store the output, nil for no output stored (relative
|
-- where to store the output, nil for no output stored (relative
|
||||||
-- path from pwd)
|
-- path from pwd)
|
||||||
-- default: nil
|
-- default: nil
|
||||||
output = nil,
|
output = nil,
|
||||||
-- true for all crates.io and external crates, false only the local
|
-- true for all crates.io and external crates, false only the local
|
||||||
-- crates
|
-- crates
|
||||||
-- default: true
|
-- default: true
|
||||||
full = true,
|
full = true,
|
||||||
|
|
||||||
-- List of backends found on: https://graphviz.org/docs/outputs/
|
-- List of backends found on: https://graphviz.org/docs/outputs/
|
||||||
-- Is used for input validation and autocompletion
|
-- Is used for input validation and autocompletion
|
||||||
-- Last updated: 2021-08-26
|
-- Last updated: 2021-08-26
|
||||||
enabled_graphviz_backends = {
|
enabled_graphviz_backends = {
|
||||||
"bmp",
|
"bmp",
|
||||||
"cgimage",
|
"cgimage",
|
||||||
"canon",
|
"canon",
|
||||||
"dot",
|
"dot",
|
||||||
"gv",
|
"gv",
|
||||||
"xdot",
|
"xdot",
|
||||||
"xdot1.2",
|
"xdot1.2",
|
||||||
"xdot1.4",
|
"xdot1.4",
|
||||||
"eps",
|
"eps",
|
||||||
"exr",
|
"exr",
|
||||||
"fig",
|
"fig",
|
||||||
"gd",
|
"gd",
|
||||||
"gd2",
|
"gd2",
|
||||||
"gif",
|
"gif",
|
||||||
"gtk",
|
"gtk",
|
||||||
"ico",
|
"ico",
|
||||||
"cmap",
|
"cmap",
|
||||||
"ismap",
|
"ismap",
|
||||||
"imap",
|
"imap",
|
||||||
"cmapx",
|
"cmapx",
|
||||||
"imap_np",
|
"imap_np",
|
||||||
"cmapx_np",
|
"cmapx_np",
|
||||||
"jpg",
|
"jpg",
|
||||||
"jpeg",
|
"jpeg",
|
||||||
"jpe",
|
"jpe",
|
||||||
"jp2",
|
"jp2",
|
||||||
"json",
|
"json",
|
||||||
"json0",
|
"json0",
|
||||||
"dot_json",
|
"dot_json",
|
||||||
"xdot_json",
|
"xdot_json",
|
||||||
"pdf",
|
"pdf",
|
||||||
"pic",
|
"pic",
|
||||||
"pct",
|
"pct",
|
||||||
"pict",
|
"pict",
|
||||||
"plain",
|
"plain",
|
||||||
"plain-ext",
|
"plain-ext",
|
||||||
"png",
|
"png",
|
||||||
"pov",
|
"pov",
|
||||||
"ps",
|
"ps",
|
||||||
"ps2",
|
"ps2",
|
||||||
"psd",
|
"psd",
|
||||||
"sgi",
|
"sgi",
|
||||||
"svg",
|
"svg",
|
||||||
"svgz",
|
"svgz",
|
||||||
"tga",
|
"tga",
|
||||||
"tiff",
|
"tiff",
|
||||||
"tif",
|
"tif",
|
||||||
"tk",
|
"tk",
|
||||||
"vml",
|
"vml",
|
||||||
"vmlz",
|
"vmlz",
|
||||||
"wbmp",
|
"wbmp",
|
||||||
"webp",
|
"webp",
|
||||||
"xlib",
|
"xlib",
|
||||||
"x11",
|
"x11",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
-- all the opts to send to nvim-lspconfig
|
-- all the opts to send to nvim-lspconfig
|
||||||
-- these override the defaults set by rust-tools.nvim
|
-- these override the defaults set by rust-tools.nvim
|
||||||
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
|
-- see https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rust_analyzer
|
||||||
server = {
|
server = {
|
||||||
-- standalone file support
|
-- standalone file support
|
||||||
-- setting it to false may improve startup time
|
-- setting it to false may improve startup time
|
||||||
standalone = true,
|
standalone = true,
|
||||||
}, -- rust-analyzer options
|
}, -- rust-analyzer options
|
||||||
|
|
||||||
-- debugging stuff
|
-- debugging stuff
|
||||||
dap = {
|
dap = {
|
||||||
adapter = {
|
adapter = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = "lldb-vscode",
|
command = "lldb-vscode",
|
||||||
name = "rt_lldb",
|
name = "rt_lldb",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,78 +1,78 @@
|
||||||
return function()
|
return function()
|
||||||
local cmp = require("cmp")
|
local cmp = require "cmp"
|
||||||
|
|
||||||
cmp.setup({
|
cmp.setup {
|
||||||
snippet = {
|
snippet = {
|
||||||
-- Select the luasnip engine here. You can switch to another engine.
|
-- Select the luasnip engine here. You can switch to another engine.
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
require("luasnip").lsp_expand(args.body) -- For `luasnip` users.
|
||||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered({
|
completion = cmp.config.window.bordered {
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
winhighlight = "",
|
winhighlight = "",
|
||||||
minwidth = 60,
|
minwidth = 60,
|
||||||
}),
|
},
|
||||||
documentation = cmp.config.window.bordered({
|
documentation = cmp.config.window.bordered {
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
winhighlight = "",
|
winhighlight = "",
|
||||||
}),
|
},
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = require("lspkind").cmp_format({
|
format = require("lspkind").cmp_format {
|
||||||
mode = "symbol_text",
|
mode = "symbol_text",
|
||||||
}),
|
},
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert {
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
["<C-Space>"] = cmp.mapping.complete(),
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
["<CR>"] = cmp.mapping.confirm { select = true }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
|
||||||
["<Tab>"] = function(fallback)
|
["<Tab>"] = function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}),
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
}, {
|
}, {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
}),
|
}),
|
||||||
})
|
}
|
||||||
|
|
||||||
-- `/` cmdline setup.
|
-- `/` cmdline setup.
|
||||||
cmp.setup.cmdline("/", {
|
cmp.setup.cmdline("/", {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "buffer" },
|
{ name = "buffer" },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- `:` cmdline setup.
|
-- `:` cmdline setup.
|
||||||
cmp.setup.cmdline(":", {
|
cmp.setup.cmdline(":", {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "path" },
|
{ name = "path" },
|
||||||
}, {
|
}, {
|
||||||
{
|
{
|
||||||
name = "cmdline",
|
name = "cmdline",
|
||||||
option = {
|
option = {
|
||||||
ignore_cmds = { "Man", "!" },
|
ignore_cmds = { "Man", "!" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
|
|
||||||
-- If you want insert `(` after select function or method item
|
-- If you want insert `(` after select function or method item
|
||||||
local cmp_autopairs = require("nvim-autopairs.completion.cmp")
|
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
|
||||||
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
return function()
|
return function()
|
||||||
local bufferline = require("bufferline")
|
local bufferline = require "bufferline"
|
||||||
bufferline.setup({
|
bufferline.setup {
|
||||||
options = {
|
options = {
|
||||||
mode = "buffers", -- set to "tabs" to only show tabpages instead
|
mode = "buffers", -- set to "tabs" to only show tabpages instead
|
||||||
style_preset = bufferline.style_preset.default, -- or bufferline.style_preset.minimal,
|
style_preset = bufferline.style_preset.default, -- or bufferline.style_preset.minimal,
|
||||||
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
|
themable = true, -- allows highlight groups to be overriden i.e. sets highlights as default
|
||||||
--numbers = function(opts)
|
--numbers = function(opts)
|
||||||
-- return string.format("%s·%s", opts.raise(opts.id), opts.lower(opts.ordinal))
|
-- return string.format("%s·%s", opts.raise(opts.id), opts.lower(opts.ordinal))
|
||||||
--end,
|
--end,
|
||||||
indicator = {
|
indicator = {
|
||||||
icon = "▎", -- this should be omitted if indicator style is not 'icon'
|
icon = "▎", -- this should be omitted if indicator style is not 'icon'
|
||||||
style = "icon",
|
style = "icon",
|
||||||
},
|
},
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
diagnostics_update_in_insert = false,
|
diagnostics_update_in_insert = false,
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "neo-tree",
|
filetype = "neo-tree",
|
||||||
text = require("custom_opts").file_explorer_title,
|
text = require("custom_opts").file_explorer_title,
|
||||||
text_align = "left",
|
text_align = "left",
|
||||||
separator = true,
|
separator = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
color_icons = true, -- whether or not to add the filetype icon highlights
|
color_icons = true, -- whether or not to add the filetype icon highlights
|
||||||
separator_style = require("custom_opts").tab_style,
|
separator_style = require("custom_opts").tab_style,
|
||||||
hover = {
|
hover = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
delay = 200,
|
delay = 200,
|
||||||
reveal = { "close" },
|
reveal = { "close" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,85 +1,85 @@
|
||||||
return {
|
return {
|
||||||
-- auto-tag
|
-- auto-tag
|
||||||
{
|
{
|
||||||
"windwp/nvim-ts-autotag",
|
"windwp/nvim-ts-autotag",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-ts-autotag").setup()
|
require("nvim-ts-autotag").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- auto-pairs
|
-- auto-pairs
|
||||||
{
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-autopairs").setup({
|
require("nvim-autopairs").setup {
|
||||||
enable_check_bracket_line = false,
|
enable_check_bracket_line = false,
|
||||||
ignored_next_char = "[%w%.]", -- will ignore alphanumeric and `.` symbol
|
ignored_next_char = "[%w%.]", -- will ignore alphanumeric and `.` symbol
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- auto completion
|
-- auto completion
|
||||||
{
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/autocmp/config")()
|
require "plugins/autocmp/config"()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ "hrsh7th/cmp-nvim-lsp" },
|
{ "hrsh7th/cmp-nvim-lsp" },
|
||||||
{ "hrsh7th/cmp-buffer" },
|
{ "hrsh7th/cmp-buffer" },
|
||||||
{ "hrsh7th/cmp-path" },
|
{ "hrsh7th/cmp-path" },
|
||||||
{ "hrsh7th/cmp-cmdline" },
|
{ "hrsh7th/cmp-cmdline" },
|
||||||
|
|
||||||
{ "L3MON4D3/LuaSnip" }, -- install the LuaSnip engine
|
{ "L3MON4D3/LuaSnip" }, -- install the LuaSnip engine
|
||||||
|
|
||||||
{ "onsails/lspkind.nvim" }, -- icons in autocomplete source
|
{ "onsails/lspkind.nvim" }, -- icons in autocomplete source
|
||||||
|
|
||||||
-- todo comments
|
-- todo comments
|
||||||
-- Preview
|
-- Preview
|
||||||
-- TODO: todo
|
-- TODO: todo
|
||||||
-- FIX: fix
|
-- FIX: fix
|
||||||
-- WARNING: warning
|
-- WARNING: warning
|
||||||
-- HACK: hack
|
-- HACK: hack
|
||||||
-- NOTE: note
|
-- NOTE: note
|
||||||
-- PERF: perf
|
-- PERF: perf
|
||||||
-- TEST: test
|
-- TEST: test
|
||||||
--
|
--
|
||||||
{
|
{
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
require("todo-comments").setup({
|
require("todo-comments").setup {
|
||||||
keywords = {
|
keywords = {
|
||||||
FIX = {
|
FIX = {
|
||||||
icon = " ", -- icon used for the sign, and in search results
|
icon = " ", -- icon used for the sign, and in search results
|
||||||
color = "error", -- can be a hex color, or a named color (see below)
|
color = "error", -- can be a hex color, or a named color (see below)
|
||||||
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords
|
||||||
-- signs = false, -- configure signs for some keywords individually
|
-- signs = false, -- configure signs for some keywords individually
|
||||||
},
|
},
|
||||||
TODO = { icon = " ", color = "todo" },
|
TODO = { icon = " ", color = "todo" },
|
||||||
HACK = { icon = " ", color = "warning" },
|
HACK = { icon = " ", color = "warning" },
|
||||||
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } },
|
||||||
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
PERF = { icon = "", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } },
|
||||||
NOTE = { icon = " ", color = "info", alt = { "INFO" } },
|
NOTE = { icon = " ", color = "info", alt = { "INFO" } },
|
||||||
TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } },
|
||||||
},
|
},
|
||||||
colors = {
|
colors = {
|
||||||
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
|
error = { "DiagnosticError", "ErrorMsg", "#DC2626" },
|
||||||
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
|
warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" },
|
||||||
todo = { "DiagnosticOk", "#2563EB" },
|
todo = { "DiagnosticOk", "#2563EB" },
|
||||||
info = { "DiagnosticInfo", "#10B981" },
|
info = { "DiagnosticInfo", "#10B981" },
|
||||||
default = { "Identifier", "#7C3AED" },
|
default = { "Identifier", "#7C3AED" },
|
||||||
test = { "Identifier", "#FF00FF" },
|
test = { "Identifier", "#FF00FF" },
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- guess indent
|
-- guess indent
|
||||||
{
|
{
|
||||||
"nmac427/guess-indent.nvim",
|
"nmac427/guess-indent.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("guess-indent").setup({})
|
require("guess-indent").setup {}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"hardhackerlabs/theme-vim",
|
"hardhackerlabs/theme-vim",
|
||||||
name = "hardhacker",
|
name = "hardhacker",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.hardhacker_darker = 0
|
vim.g.hardhacker_darker = 0
|
||||||
vim.g.hardhacker_hide_tilde = 1
|
vim.g.hardhacker_hide_tilde = 1
|
||||||
vim.g.hardhacker_keyword_italic = 1
|
vim.g.hardhacker_keyword_italic = 1
|
||||||
-- vim.cmd("colorscheme hardhacker")
|
-- vim.cmd("colorscheme hardhacker")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
config = function()
|
config = function()
|
||||||
-- vim.cmd("colorscheme tokyonight-storm")
|
-- vim.cmd("colorscheme tokyonight-storm")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"rose-pine/neovim",
|
"rose-pine/neovim",
|
||||||
name = "rose-pine",
|
name = "rose-pine",
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd("colorscheme rose-pine-main")
|
vim.cmd "colorscheme rose-pine-main"
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope.nvim',
|
"nvim-telescope/telescope.nvim",
|
||||||
dependencies = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}},
|
dependencies = { { "nvim-lua/popup.nvim" }, { "nvim-lua/plenary.nvim" } },
|
||||||
config = function()
|
config = function()
|
||||||
require'telescope'.setup{}
|
require("telescope").setup {}
|
||||||
|
|
||||||
local option = {noremap = true, silent = true }
|
local option = { noremap = true, silent = true }
|
||||||
|
|
||||||
local keys = require("custom_keys")
|
local keys = require "custom_keys"
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require "telescope.builtin"
|
||||||
vim.keymap.set('n', keys.find_files, builtin.find_files, option)
|
vim.keymap.set("n", keys.find_files, builtin.find_files, option)
|
||||||
vim.keymap.set('n', keys.live_grep, builtin.live_grep, option)
|
vim.keymap.set("n", keys.live_grep, builtin.live_grep, option)
|
||||||
vim.keymap.set('n', keys.search_cursor, builtin.grep_string, option)
|
vim.keymap.set("n", keys.search_cursor, builtin.grep_string, option)
|
||||||
vim.keymap.set('n', keys.find_buffer, builtin.buffers, option)
|
vim.keymap.set("n", keys.find_buffer, builtin.buffers, option)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
require("gitsigns").setup({
|
require("gitsigns").setup {
|
||||||
current_line_blame = true,
|
current_line_blame = true,
|
||||||
preview_config = {
|
preview_config = {
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{ "sindrets/diffview.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
|
{ "sindrets/diffview.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +1,46 @@
|
||||||
return {
|
return {
|
||||||
-- Syntax highlighting
|
-- Syntax highlighting
|
||||||
{
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-treesitter.configs").setup({
|
require("nvim-treesitter.configs").setup {
|
||||||
indent = {
|
indent = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = {},
|
disable = {},
|
||||||
},
|
},
|
||||||
ensure_installed = { "markdown", "markdown_inline", "regex" },
|
ensure_installed = { "markdown", "markdown_inline", "regex" },
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = true,
|
auto_install = true,
|
||||||
ignore_install = {},
|
ignore_install = {},
|
||||||
|
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = {},
|
disable = {},
|
||||||
disable = function(lang, buf)
|
disable = function(lang, buf)
|
||||||
local max_filesize = 100 * 1024 -- 100 KB
|
local max_filesize = 100 * 1024 -- 100 KB
|
||||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||||
if ok and stats and stats.size > max_filesize then
|
if ok and stats and stats.size > max_filesize then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
additional_vim_regex_highlighting = false,
|
additional_vim_regex_highlighting = false,
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
|
|
||||||
-- let it to use 'markdown' parser for mdx filetype.
|
-- let it to use 'markdown' parser for mdx filetype.
|
||||||
vim.treesitter.language.register('markdown', 'mdx')
|
vim.treesitter.language.register("markdown", "mdx")
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Colors highlighting
|
-- Colors highlighting
|
||||||
{
|
{
|
||||||
"NvChad/nvim-colorizer.lua",
|
"NvChad/nvim-colorizer.lua",
|
||||||
config = function(plun)
|
config = function(plun)
|
||||||
require("colorizer").setup({
|
require("colorizer").setup {
|
||||||
user_default_options = {
|
user_default_options = {
|
||||||
names = false,
|
names = false,
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,103 +1,103 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"williamboman/mason.nvim",
|
"williamboman/mason.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("mason").setup({
|
require("mason").setup {
|
||||||
ui = {
|
ui = {
|
||||||
icons = {
|
icons = {
|
||||||
package_installed = "✓",
|
package_installed = "✓",
|
||||||
package_pending = "➜",
|
package_pending = "➜",
|
||||||
package_uninstalled = "✗",
|
package_uninstalled = "✗",
|
||||||
},
|
},
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"williamboman/mason-lspconfig.nvim",
|
"williamboman/mason-lspconfig.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("mason-lspconfig").setup()
|
require("mason-lspconfig").setup()
|
||||||
require("mason-lspconfig").setup_handlers({
|
require("mason-lspconfig").setup_handlers {
|
||||||
-- The first entry (without a key) will be the default handler
|
-- The first entry (without a key) will be the default handler
|
||||||
-- and will be called for each installed server that doesn't have
|
-- and will be called for each installed server that doesn't have
|
||||||
-- a dedicated handler.
|
-- a dedicated handler.
|
||||||
function(server_name) -- default handler (optional)
|
function(server_name) -- default handler (optional)
|
||||||
require("lspconfig")[server_name].setup({})
|
require("lspconfig")[server_name].setup {}
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- Next, you can provide a dedicated handler for specific servers.
|
|
||||||
-- For example, a handler override for the `rust_analyzer`:
|
|
||||||
-- ["rust_analyzer"] = function ()
|
|
||||||
-- require("rust-tools").setup {}
|
|
||||||
-- end
|
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
-- Next, you can provide a dedicated handler for specific servers.
|
||||||
"neovim/nvim-lspconfig",
|
-- For example, a handler override for the `rust_analyzer`:
|
||||||
config = function()
|
-- ["rust_analyzer"] = function ()
|
||||||
require("plugins/lspconfig/config")()
|
-- require("rust-tools").setup {}
|
||||||
end,
|
-- end
|
||||||
},
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
config = function()
|
||||||
config = function()
|
require "plugins/lspconfig/config"()
|
||||||
local null_ls = require("null-ls")
|
end,
|
||||||
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
},
|
||||||
|
|
||||||
null_ls.setup({
|
{
|
||||||
border = "rounded",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
cmd = { "nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
debounce = 250,
|
config = function()
|
||||||
debug = false,
|
local null_ls = require "null-ls"
|
||||||
default_timeout = 5000,
|
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
|
||||||
diagnostic_config = {},
|
|
||||||
diagnostics_format = "#{m}",
|
|
||||||
fallback_severity = vim.diagnostic.severity.ERROR,
|
|
||||||
log_level = "warn",
|
|
||||||
notify_format = "[null-ls] %s",
|
|
||||||
on_init = nil,
|
|
||||||
on_exit = nil,
|
|
||||||
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", "Makefile", ".git"),
|
|
||||||
should_attach = nil,
|
|
||||||
sources = nil,
|
|
||||||
temp_dir = nil,
|
|
||||||
update_in_insert = false,
|
|
||||||
-- formatting on save
|
|
||||||
--on_attach = function(client, bufnr)
|
|
||||||
-- if client.supports_method("textDocument/formatting") then
|
|
||||||
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
|
||||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
|
||||||
-- group = augroup,
|
|
||||||
-- buffer = bufnr,
|
|
||||||
-- callback = function()
|
|
||||||
-- vim.lsp.buf.format({ bufnr = bufnr })
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
-- end
|
|
||||||
--end,
|
|
||||||
}) -- end of setup
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
null_ls.setup {
|
||||||
"jay-babu/mason-null-ls.nvim",
|
border = "rounded",
|
||||||
event = { "BufReadPre", "BufNewFile" },
|
cmd = { "nvim" },
|
||||||
dependencies = {
|
debounce = 250,
|
||||||
"williamboman/mason.nvim",
|
debug = false,
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
default_timeout = 5000,
|
||||||
},
|
diagnostic_config = {},
|
||||||
config = function()
|
diagnostics_format = "#{m}",
|
||||||
require("mason-null-ls").setup({
|
fallback_severity = vim.diagnostic.severity.ERROR,
|
||||||
automatic_setup = true,
|
log_level = "warn",
|
||||||
ensure_installed = { "shfmt", "prettier", "stylua" },
|
notify_format = "[null-ls] %s",
|
||||||
handlers = {},
|
on_init = nil,
|
||||||
})
|
on_exit = nil,
|
||||||
end,
|
root_dir = require("null-ls.utils").root_pattern(".null-ls-root", "Makefile", ".git"),
|
||||||
},
|
should_attach = nil,
|
||||||
|
sources = nil,
|
||||||
|
temp_dir = nil,
|
||||||
|
update_in_insert = false,
|
||||||
|
-- formatting on save
|
||||||
|
--on_attach = function(client, bufnr)
|
||||||
|
-- if client.supports_method("textDocument/formatting") then
|
||||||
|
-- vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
|
||||||
|
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||||
|
-- group = augroup,
|
||||||
|
-- buffer = bufnr,
|
||||||
|
-- callback = function()
|
||||||
|
-- vim.lsp.buf.format({ bufnr = bufnr })
|
||||||
|
-- end,
|
||||||
|
-- })
|
||||||
|
-- end
|
||||||
|
--end,
|
||||||
|
} -- end of setup
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"jay-babu/mason-null-ls.nvim",
|
||||||
|
event = { "BufReadPre", "BufNewFile" },
|
||||||
|
dependencies = {
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
require("mason-null-ls").setup {
|
||||||
|
automatic_setup = true,
|
||||||
|
ensure_installed = { "shfmt", "prettier", "stylua" },
|
||||||
|
handlers = {},
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,42 +1,42 @@
|
||||||
return function()
|
return function()
|
||||||
require("lspconfig.ui.windows").default_options.border = "rounded"
|
require("lspconfig.ui.windows").default_options.border = "rounded"
|
||||||
|
|
||||||
-- Global mappings.
|
-- Global mappings.
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float)
|
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float)
|
||||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
|
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
|
||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
|
vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
|
||||||
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist)
|
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist)
|
||||||
|
|
||||||
-- Use LspAttach autocommand to only map the following keys
|
-- Use LspAttach autocommand to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
vim.api.nvim_create_autocmd("LspAttach", {
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||||
callback = function(ev)
|
callback = function(ev)
|
||||||
-- Enable completion triggered by <c-x><c-o>
|
-- Enable completion triggered by <c-x><c-o>
|
||||||
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
|
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||||
|
|
||||||
-- Buffer local mappings.
|
-- Buffer local mappings.
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
local opts = { buffer = ev.buf }
|
local opts = { buffer = ev.buf }
|
||||||
vim.keymap.set("n", require("custom_keys").goto_declaration, vim.lsp.buf.declaration, opts)
|
vim.keymap.set("n", require("custom_keys").goto_declaration, vim.lsp.buf.declaration, opts)
|
||||||
vim.keymap.set("n", require("custom_keys").goto_definition, vim.lsp.buf.definition, opts)
|
vim.keymap.set("n", require("custom_keys").goto_definition, vim.lsp.buf.definition, opts)
|
||||||
vim.keymap.set("n", require("custom_keys").goto_references, vim.lsp.buf.references, opts)
|
vim.keymap.set("n", require("custom_keys").goto_references, vim.lsp.buf.references, opts)
|
||||||
vim.keymap.set("n", require("custom_keys").goto_impl, vim.lsp.buf.implementation, opts)
|
vim.keymap.set("n", require("custom_keys").goto_impl, vim.lsp.buf.implementation, opts)
|
||||||
vim.keymap.set("n", require("custom_keys").lsp_rename, vim.lsp.buf.rename, opts)
|
vim.keymap.set("n", require("custom_keys").lsp_rename, vim.lsp.buf.rename, opts)
|
||||||
vim.keymap.set("n", require("custom_keys").format, function()
|
vim.keymap.set("n", require("custom_keys").format, function()
|
||||||
vim.lsp.buf.format({ async = true })
|
vim.lsp.buf.format { async = true }
|
||||||
end, opts)
|
end, opts)
|
||||||
|
|
||||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
|
||||||
vim.keymap.set("n", "<C-m>", vim.lsp.buf.signature_help, opts)
|
vim.keymap.set("n", "<C-m>", vim.lsp.buf.signature_help, opts)
|
||||||
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, opts)
|
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, opts)
|
||||||
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
||||||
vim.keymap.set("n", "<space>wl", function()
|
vim.keymap.set("n", "<space>wl", function()
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||||
end, opts)
|
end, opts)
|
||||||
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, opts)
|
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, opts)
|
||||||
vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts)
|
vim.keymap.set({ "n", "v" }, "<space>ca", vim.lsp.buf.code_action, opts)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,135 +1,135 @@
|
||||||
return function()
|
return function()
|
||||||
--local colors = {
|
--local colors = {
|
||||||
-- red = "#e965a5",
|
-- red = "#e965a5",
|
||||||
-- green = "#b1f2a7",
|
-- green = "#b1f2a7",
|
||||||
-- yellow = "#ebde76",
|
-- yellow = "#ebde76",
|
||||||
-- blue = "#b1baf4",
|
-- blue = "#b1baf4",
|
||||||
-- purple = "#e192ef",
|
-- purple = "#e192ef",
|
||||||
-- cyan = "#b3f4f3",
|
-- cyan = "#b3f4f3",
|
||||||
-- white = "#eee9fc",
|
-- white = "#eee9fc",
|
||||||
-- black = "#282433",
|
-- black = "#282433",
|
||||||
-- selection = "#282433",
|
-- selection = "#282433",
|
||||||
-- comment = "#938aad",
|
-- comment = "#938aad",
|
||||||
--}
|
--}
|
||||||
|
|
||||||
--local hardhacker_theme = {
|
--local hardhacker_theme = {
|
||||||
-- normal = {
|
-- normal = {
|
||||||
-- a = { fg = colors.black, bg = colors.purple },
|
-- a = { fg = colors.black, bg = colors.purple },
|
||||||
-- b = { fg = colors.red, bg = colors.selection },
|
-- b = { fg = colors.red, bg = colors.selection },
|
||||||
-- c = { fg = colors.comment, bg = colors.selection },
|
-- c = { fg = colors.comment, bg = colors.selection },
|
||||||
-- },
|
-- },
|
||||||
|
|
||||||
-- insert = { a = { fg = colors.black, bg = colors.green } },
|
-- insert = { a = { fg = colors.black, bg = colors.green } },
|
||||||
-- visual = { a = { fg = colors.black, bg = colors.yellow } },
|
-- visual = { a = { fg = colors.black, bg = colors.yellow } },
|
||||||
-- replace = { a = { fg = colors.black, bg = colors.red } },
|
-- replace = { a = { fg = colors.black, bg = colors.red } },
|
||||||
|
|
||||||
-- inactive = {
|
-- inactive = {
|
||||||
-- a = { fg = colors.white, bg = colors.selection },
|
-- a = { fg = colors.white, bg = colors.selection },
|
||||||
-- b = { fg = colors.white, bg = colors.selection },
|
-- b = { fg = colors.white, bg = colors.selection },
|
||||||
-- c = { fg = colors.white, bg = colors.selection },
|
-- c = { fg = colors.white, bg = colors.selection },
|
||||||
-- },
|
-- },
|
||||||
--}
|
--}
|
||||||
|
|
||||||
require("lualine").setup({
|
require("lualine").setup {
|
||||||
options = {
|
options = {
|
||||||
icons_enabled = true,
|
icons_enabled = true,
|
||||||
theme = vim.g.hardhacker_lualine_theme,
|
theme = vim.g.hardhacker_lualine_theme,
|
||||||
component_separators = "",
|
component_separators = "",
|
||||||
section_separators = { left = "", right = "" },
|
section_separators = { left = "", right = "" },
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
statusline = {},
|
statusline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
},
|
},
|
||||||
ignore_focus = {},
|
ignore_focus = {},
|
||||||
always_divide_middle = true,
|
always_divide_middle = true,
|
||||||
globalstatus = true,
|
globalstatus = true,
|
||||||
refresh = {
|
refresh = {
|
||||||
statusline = 1000,
|
statusline = 1000,
|
||||||
tabline = 1000,
|
tabline = 1000,
|
||||||
winbar = 1000,
|
winbar = 1000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = { { "mode", separator = { left = "" }, right_padding = 2 } },
|
lualine_a = { { "mode", separator = { left = "" }, right_padding = 2 } },
|
||||||
lualine_b = {
|
lualine_b = {
|
||||||
{ "branch" },
|
{ "branch" },
|
||||||
{ "diff" },
|
{ "diff" },
|
||||||
},
|
},
|
||||||
lualine_c = {
|
lualine_c = {
|
||||||
{
|
{
|
||||||
"filename",
|
"filename",
|
||||||
file_status = true, -- Displays file status (readonly status, modified status)
|
file_status = true, -- Displays file status (readonly status, modified status)
|
||||||
newfile_status = false, -- Display new file status (new file means no write after created)
|
newfile_status = false, -- Display new file status (new file means no write after created)
|
||||||
path = 3, -- 0: Just the filename
|
path = 3, -- 0: Just the filename
|
||||||
-- 1: Relative path
|
-- 1: Relative path
|
||||||
-- 2: Absolute path
|
-- 2: Absolute path
|
||||||
-- 3: Absolute path, with tilde as the home directory
|
-- 3: Absolute path, with tilde as the home directory
|
||||||
-- 4: Filename and parent dir, with tilde as the home directory
|
-- 4: Filename and parent dir, with tilde as the home directory
|
||||||
|
|
||||||
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
|
||||||
-- for other components. (terrible name, any suggestions?)
|
-- for other components. (terrible name, any suggestions?)
|
||||||
symbols = {
|
symbols = {
|
||||||
modified = "[+]", -- Text to show when the file is modified.
|
modified = "[+]", -- Text to show when the file is modified.
|
||||||
readonly = "[-]", -- Text to show when the file is non-modifiable or readonly.
|
readonly = "[-]", -- Text to show when the file is non-modifiable or readonly.
|
||||||
unnamed = "[No Name]", -- Text to show for unnamed buffers.
|
unnamed = "[No Name]", -- Text to show for unnamed buffers.
|
||||||
newfile = "[New]", -- Text to show for newly created file before first write
|
newfile = "[New]", -- Text to show for newly created file before first write
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
lualine_x = {
|
lualine_x = {
|
||||||
{
|
{
|
||||||
require("noice").api.status.command.get,
|
require("noice").api.status.command.get,
|
||||||
cond = require("noice").api.status.command.has,
|
cond = require("noice").api.status.command.has,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
require("noice").api.status.search.get,
|
require("noice").api.status.search.get,
|
||||||
cond = require("noice").api.status.search.has,
|
cond = require("noice").api.status.search.has,
|
||||||
},
|
},
|
||||||
"encoding",
|
"encoding",
|
||||||
"fileformat",
|
"fileformat",
|
||||||
"filetype",
|
"filetype",
|
||||||
},
|
},
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
"filesize",
|
"filesize",
|
||||||
"progress",
|
"progress",
|
||||||
-- {
|
-- {
|
||||||
-- "diagnostics",
|
-- "diagnostics",
|
||||||
|
|
||||||
-- -- Table of diagnostic sources, available sources are:
|
-- -- Table of diagnostic sources, available sources are:
|
||||||
-- -- 'nvim_lsp', 'nvim_diagnostic', 'nvim_workspace_diagnostic', 'coc', 'ale', 'vim_lsp'.
|
-- -- 'nvim_lsp', 'nvim_diagnostic', 'nvim_workspace_diagnostic', 'coc', 'ale', 'vim_lsp'.
|
||||||
-- -- or a function that returns a table as such:
|
-- -- or a function that returns a table as such:
|
||||||
-- -- { error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt }
|
-- -- { error=error_cnt, warn=warn_cnt, info=info_cnt, hint=hint_cnt }
|
||||||
-- sources = { "nvim_lsp", "nvim_diagnostic" },
|
-- sources = { "nvim_lsp", "nvim_diagnostic" },
|
||||||
|
|
||||||
-- -- Displays diagnostics for the defined severity types
|
-- -- Displays diagnostics for the defined severity types
|
||||||
-- sections = { "error", "warn", "info", "hint" },
|
-- sections = { "error", "warn", "info", "hint" },
|
||||||
|
|
||||||
-- diagnostics_color = {
|
-- diagnostics_color = {
|
||||||
-- -- Same values as the general color option can be used here.
|
-- -- Same values as the general color option can be used here.
|
||||||
-- error = "DiagnosticError", -- Changes diagnostics' error color.
|
-- error = "DiagnosticError", -- Changes diagnostics' error color.
|
||||||
-- warn = "DiagnosticWarn", -- Changes diagnostics' warn color.
|
-- warn = "DiagnosticWarn", -- Changes diagnostics' warn color.
|
||||||
-- info = "DiagnosticInfo", -- Changes diagnostics' info color.
|
-- info = "DiagnosticInfo", -- Changes diagnostics' info color.
|
||||||
-- hint = "DiagnosticHint", -- Changes diagnostics' hint color.
|
-- hint = "DiagnosticHint", -- Changes diagnostics' hint color.
|
||||||
-- },
|
-- },
|
||||||
-- symbols = { error = " ", warn = " ", info = " ", hint = " " },
|
-- symbols = { error = " ", warn = " ", info = " ", hint = " " },
|
||||||
-- colored = true, -- Displays diagnostics status in color if set to true.
|
-- colored = true, -- Displays diagnostics status in color if set to true.
|
||||||
-- update_in_insert = false, -- Update diagnostics in insert mode.
|
-- update_in_insert = false, -- Update diagnostics in insert mode.
|
||||||
-- always_visible = false, -- Show diagnostics even if there are none.
|
-- always_visible = false, -- Show diagnostics even if there are none.
|
||||||
-- },
|
-- },
|
||||||
},
|
},
|
||||||
lualine_z = { { "location", separator = { right = "" }, left_padding = 2 } },
|
lualine_z = { { "location", separator = { right = "" }, left_padding = 2 } },
|
||||||
},
|
},
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = {},
|
lualine_a = {},
|
||||||
lualine_b = {},
|
lualine_b = {},
|
||||||
lualine_c = { "filename" },
|
lualine_c = { "filename" },
|
||||||
lualine_x = { "location" },
|
lualine_x = { "location" },
|
||||||
lualine_y = {},
|
lualine_y = {},
|
||||||
lualine_z = {},
|
lualine_z = {},
|
||||||
},
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
winbar = {},
|
winbar = {},
|
||||||
inactive_winbar = {},
|
inactive_winbar = {},
|
||||||
extensions = {},
|
extensions = {},
|
||||||
})
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,208 +1,208 @@
|
||||||
return function()
|
return function()
|
||||||
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
-- Unless you are still migrating, remove the deprecated commands from v1.x
|
||||||
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
|
vim.cmd [[ let g:neo_tree_remove_legacy_commands = 1 ]]
|
||||||
|
|
||||||
-- If you want icons for diagnostic errors, you'll need to define them somewhere:
|
-- If you want icons for diagnostic errors, you'll need to define them somewhere:
|
||||||
vim.fn.sign_define("DiagnosticSignError", {text = " ", texthl = "DiagnosticSignError"})
|
vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" })
|
||||||
vim.fn.sign_define("DiagnosticSignWarn", {text = " ", texthl = "DiagnosticSignWarn"})
|
vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" })
|
||||||
vim.fn.sign_define("DiagnosticSignInfo", {text = " ", texthl = "DiagnosticSignInfo"})
|
vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" })
|
||||||
vim.fn.sign_define("DiagnosticSignHint", {text = " ", texthl = "DiagnosticSignHint"})
|
vim.fn.sign_define("DiagnosticSignHint", { text = " ", texthl = "DiagnosticSignHint" })
|
||||||
|
|
||||||
require("neo-tree").setup({
|
require("neo-tree").setup {
|
||||||
close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
|
close_if_last_window = false, -- Close Neo-tree if it is the last window left in the tab
|
||||||
popup_border_style = "rounded",
|
popup_border_style = "rounded",
|
||||||
enable_git_status = true,
|
enable_git_status = true,
|
||||||
enable_diagnostics = true,
|
enable_diagnostics = true,
|
||||||
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
|
open_files_do_not_replace_types = { "terminal", "trouble", "qf" }, -- when opening files, do not use windows containing these filetypes or buftypes
|
||||||
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
sort_case_insensitive = false, -- used when sorting files and directories in the tree
|
||||||
sort_function = nil , -- use a custom function for sorting files and directories in the tree
|
sort_function = nil, -- use a custom function for sorting files and directories in the tree
|
||||||
-- sort_function = function (a,b)
|
-- sort_function = function (a,b)
|
||||||
-- if a.type == b.type then
|
-- if a.type == b.type then
|
||||||
-- return a.path > b.path
|
-- return a.path > b.path
|
||||||
-- else
|
-- else
|
||||||
-- return a.type > b.type
|
-- return a.type > b.type
|
||||||
-- end
|
-- end
|
||||||
-- end , -- this sorts files and directories descendantly
|
-- end , -- this sorts files and directories descendantly
|
||||||
|
|
||||||
sources = {
|
sources = {
|
||||||
"filesystem",
|
"filesystem",
|
||||||
"buffers",
|
"buffers",
|
||||||
"git_status",
|
"git_status",
|
||||||
|
},
|
||||||
|
|
||||||
|
source_selector = {
|
||||||
|
winbar = false,
|
||||||
|
statusline = false,
|
||||||
|
},
|
||||||
|
|
||||||
|
default_component_configs = {
|
||||||
|
container = {
|
||||||
|
enable_character_fade = true,
|
||||||
|
},
|
||||||
|
icon = {
|
||||||
|
folder_closed = "",
|
||||||
|
folder_open = "",
|
||||||
|
default = "*",
|
||||||
|
highlight = "NeoTreeFileIcon",
|
||||||
|
folder_empty = "",
|
||||||
|
folder_empty_open = "",
|
||||||
|
},
|
||||||
|
modified = {
|
||||||
|
symbol = "[+]",
|
||||||
|
highlight = "NeoTreeModified",
|
||||||
|
},
|
||||||
|
name = {
|
||||||
|
trailing_slash = false,
|
||||||
|
use_git_status_colors = true,
|
||||||
|
highlight = "NeoTreeFileName",
|
||||||
|
},
|
||||||
|
git_status = {
|
||||||
|
symbols = {
|
||||||
|
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
||||||
|
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
||||||
|
deleted = "✖", -- this can only be used in the git_status source
|
||||||
|
untracked = "",
|
||||||
|
ignored = "",
|
||||||
|
staged = "",
|
||||||
|
conflict = "",
|
||||||
|
renamed = "",
|
||||||
|
unstaged = "",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
source_selector = {
|
window = {
|
||||||
winbar = false,
|
position = "right",
|
||||||
statusline = false,
|
width = 35,
|
||||||
|
mapping_options = {
|
||||||
|
noremap = true,
|
||||||
|
nowait = true,
|
||||||
|
},
|
||||||
|
mappings = {
|
||||||
|
["<space>"] = {
|
||||||
|
"toggle_node",
|
||||||
|
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
|
||||||
},
|
},
|
||||||
|
["<2-LeftMouse>"] = "open",
|
||||||
default_component_configs = {
|
["<cr>"] = "open",
|
||||||
container = {
|
["o"] = "open",
|
||||||
enable_character_fade = true
|
["<esc>"] = "revert_preview",
|
||||||
},
|
["P"] = { "toggle_preview", config = { use_float = true } },
|
||||||
icon = {
|
["l"] = "focus_preview",
|
||||||
folder_closed = "",
|
["S"] = "open_split",
|
||||||
folder_open = "",
|
["s"] = "open_vsplit",
|
||||||
default = "*",
|
["t"] = "open_tabnew",
|
||||||
highlight = "NeoTreeFileIcon",
|
["w"] = "open_with_window_picker",
|
||||||
folder_empty = "",
|
["C"] = "close_node",
|
||||||
folder_empty_open = "",
|
["z"] = "close_all_nodes",
|
||||||
},
|
["a"] = {
|
||||||
modified = {
|
"add",
|
||||||
symbol = "[+]",
|
config = {
|
||||||
highlight = "NeoTreeModified",
|
show_path = "none", -- "none", "relative", "absolute"
|
||||||
},
|
},
|
||||||
name = {
|
|
||||||
trailing_slash = false,
|
|
||||||
use_git_status_colors = true,
|
|
||||||
highlight = "NeoTreeFileName",
|
|
||||||
},
|
|
||||||
git_status = {
|
|
||||||
symbols = {
|
|
||||||
added = "", -- or "✚", but this is redundant info if you use git_status_colors on the name
|
|
||||||
modified = "", -- or "", but this is redundant info if you use git_status_colors on the name
|
|
||||||
deleted = "✖",-- this can only be used in the git_status source
|
|
||||||
untracked = "",
|
|
||||||
ignored = "",
|
|
||||||
staged = "",
|
|
||||||
conflict = "",
|
|
||||||
renamed = "",
|
|
||||||
unstaged = "",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
||||||
|
["d"] = "delete",
|
||||||
|
["r"] = "rename",
|
||||||
|
["y"] = "copy_to_clipboard",
|
||||||
|
["x"] = "cut_to_clipboard",
|
||||||
|
["p"] = "paste_from_clipboard",
|
||||||
|
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
||||||
|
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
||||||
|
["q"] = "close_window",
|
||||||
|
["R"] = "refresh",
|
||||||
|
["?"] = "show_help",
|
||||||
|
["<"] = "prev_source",
|
||||||
|
[">"] = "next_source",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
window = {
|
filesystem = {
|
||||||
position = "right",
|
filtered_items = {
|
||||||
width = 35,
|
visible = false, -- when true, they will just be displayed differently than normal items
|
||||||
mapping_options = {
|
hide_dotfiles = false,
|
||||||
noremap = true,
|
hide_gitignored = false,
|
||||||
nowait = true,
|
hide_hidden = true, -- only works on Windows for hidden files/directories
|
||||||
},
|
hide_by_name = {
|
||||||
mappings = {
|
--"node_modules"
|
||||||
["<space>"] = {
|
|
||||||
"toggle_node",
|
|
||||||
nowait = false, -- disable `nowait` if you have existing combos starting with this char that you want to use
|
|
||||||
},
|
|
||||||
["<2-LeftMouse>"] = "open",
|
|
||||||
["<cr>"] = "open",
|
|
||||||
["o"] = "open",
|
|
||||||
["<esc>"] = "revert_preview",
|
|
||||||
["P"] = { "toggle_preview", config = { use_float = true } },
|
|
||||||
["l"] = "focus_preview",
|
|
||||||
["S"] = "open_split",
|
|
||||||
["s"] = "open_vsplit",
|
|
||||||
["t"] = "open_tabnew",
|
|
||||||
["w"] = "open_with_window_picker",
|
|
||||||
["C"] = "close_node",
|
|
||||||
["z"] = "close_all_nodes",
|
|
||||||
["a"] = {
|
|
||||||
"add",
|
|
||||||
config = {
|
|
||||||
show_path = "none" -- "none", "relative", "absolute"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
["A"] = "add_directory", -- also accepts the optional config.show_path option like "add". this also supports BASH style brace expansion.
|
|
||||||
["d"] = "delete",
|
|
||||||
["r"] = "rename",
|
|
||||||
["y"] = "copy_to_clipboard",
|
|
||||||
["x"] = "cut_to_clipboard",
|
|
||||||
["p"] = "paste_from_clipboard",
|
|
||||||
["c"] = "copy", -- takes text input for destination, also accepts the optional config.show_path option like "add":
|
|
||||||
["m"] = "move", -- takes text input for destination, also accepts the optional config.show_path option like "add".
|
|
||||||
["q"] = "close_window",
|
|
||||||
["R"] = "refresh",
|
|
||||||
["?"] = "show_help",
|
|
||||||
["<"] = "prev_source",
|
|
||||||
[">"] = "next_source",
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
hide_by_pattern = { -- uses glob style patterns
|
||||||
filesystem = {
|
--"*.meta",
|
||||||
filtered_items = {
|
--"*/src/*/tsconfig.json",
|
||||||
visible = false, -- when true, they will just be displayed differently than normal items
|
|
||||||
hide_dotfiles = false,
|
|
||||||
hide_gitignored = false,
|
|
||||||
hide_hidden = true, -- only works on Windows for hidden files/directories
|
|
||||||
hide_by_name = {
|
|
||||||
--"node_modules"
|
|
||||||
},
|
|
||||||
hide_by_pattern = { -- uses glob style patterns
|
|
||||||
--"*.meta",
|
|
||||||
--"*/src/*/tsconfig.json",
|
|
||||||
},
|
|
||||||
always_show = { -- remains visible even if other settings would normally hide it
|
|
||||||
--".gitignored",
|
|
||||||
},
|
|
||||||
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
|
||||||
--".DS_Store",
|
|
||||||
--"thumbs.db"
|
|
||||||
},
|
|
||||||
never_show_by_pattern = { -- uses glob style patterns
|
|
||||||
--".null-ls_*",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
follow_current_file = true, -- This will find and focus the file in the active buffer every
|
|
||||||
-- time the current file is changed while the tree is open.
|
|
||||||
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
|
||||||
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
|
||||||
-- in whatever position is specified in window.position
|
|
||||||
-- "open_current", -- netrw disabled, opening a directory opens within the
|
|
||||||
-- window like netrw would, regardless of window.position
|
|
||||||
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
|
||||||
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
|
|
||||||
-- instead of relying on nvim autocmd events.
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
["<bs>"] = "navigate_up",
|
|
||||||
["."] = "set_root",
|
|
||||||
["H"] = "toggle_hidden",
|
|
||||||
["/"] = "fuzzy_finder",
|
|
||||||
["D"] = "fuzzy_finder_directory",
|
|
||||||
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
|
||||||
-- ["D"] = "fuzzy_sorter_directory",
|
|
||||||
["f"] = "filter_on_submit",
|
|
||||||
["<c-x>"] = "clear_filter",
|
|
||||||
["[g"] = "prev_git_modified",
|
|
||||||
["]g"] = "next_git_modified",
|
|
||||||
},
|
|
||||||
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
|
||||||
["<down>"] = "move_cursor_down",
|
|
||||||
["<C-n>"] = "move_cursor_down",
|
|
||||||
["<up>"] = "move_cursor_up",
|
|
||||||
["<C-p>"] = "move_cursor_up",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
commands = {} -- Add a custom command or override a global one using the same function name
|
|
||||||
},
|
},
|
||||||
|
always_show = { -- remains visible even if other settings would normally hide it
|
||||||
buffers = {
|
--".gitignored",
|
||||||
follow_current_file = true, -- This will find and focus the file in the active buffer every
|
|
||||||
-- time the current file is changed while the tree is open.
|
|
||||||
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
|
||||||
show_unloaded = true,
|
|
||||||
window = {
|
|
||||||
mappings = {
|
|
||||||
["bd"] = "buffer_delete",
|
|
||||||
["<bs>"] = "navigate_up",
|
|
||||||
["."] = "set_root",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
|
never_show = { -- remains hidden even if visible is toggled to true, this overrides always_show
|
||||||
git_status = {
|
--".DS_Store",
|
||||||
window = {
|
--"thumbs.db"
|
||||||
position = "float",
|
|
||||||
mappings = {
|
|
||||||
["A"] = "git_add_all",
|
|
||||||
["gu"] = "git_unstage_file",
|
|
||||||
["ga"] = "git_add_file",
|
|
||||||
["gr"] = "git_revert_file",
|
|
||||||
["gc"] = "git_commit",
|
|
||||||
["gp"] = "git_push",
|
|
||||||
["gg"] = "git_commit_and_push",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
})
|
never_show_by_pattern = { -- uses glob style patterns
|
||||||
|
--".null-ls_*",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
follow_current_file = true, -- This will find and focus the file in the active buffer every
|
||||||
|
-- time the current file is changed while the tree is open.
|
||||||
|
group_empty_dirs = false, -- when true, empty folders will be grouped together
|
||||||
|
hijack_netrw_behavior = "open_default", -- netrw disabled, opening a directory opens neo-tree
|
||||||
|
-- in whatever position is specified in window.position
|
||||||
|
-- "open_current", -- netrw disabled, opening a directory opens within the
|
||||||
|
-- window like netrw would, regardless of window.position
|
||||||
|
-- "disabled", -- netrw left alone, neo-tree does not handle opening dirs
|
||||||
|
use_libuv_file_watcher = true, -- This will use the OS level file watchers to detect changes
|
||||||
|
-- instead of relying on nvim autocmd events.
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
["<bs>"] = "navigate_up",
|
||||||
|
["."] = "set_root",
|
||||||
|
["H"] = "toggle_hidden",
|
||||||
|
["/"] = "fuzzy_finder",
|
||||||
|
["D"] = "fuzzy_finder_directory",
|
||||||
|
["#"] = "fuzzy_sorter", -- fuzzy sorting using the fzy algorithm
|
||||||
|
-- ["D"] = "fuzzy_sorter_directory",
|
||||||
|
["f"] = "filter_on_submit",
|
||||||
|
["<c-x>"] = "clear_filter",
|
||||||
|
["[g"] = "prev_git_modified",
|
||||||
|
["]g"] = "next_git_modified",
|
||||||
|
},
|
||||||
|
fuzzy_finder_mappings = { -- define keymaps for filter popup window in fuzzy_finder_mode
|
||||||
|
["<down>"] = "move_cursor_down",
|
||||||
|
["<C-n>"] = "move_cursor_down",
|
||||||
|
["<up>"] = "move_cursor_up",
|
||||||
|
["<C-p>"] = "move_cursor_up",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
commands = {}, -- Add a custom command or override a global one using the same function name
|
||||||
|
},
|
||||||
|
|
||||||
|
buffers = {
|
||||||
|
follow_current_file = true, -- This will find and focus the file in the active buffer every
|
||||||
|
-- time the current file is changed while the tree is open.
|
||||||
|
group_empty_dirs = true, -- when true, empty folders will be grouped together
|
||||||
|
show_unloaded = true,
|
||||||
|
window = {
|
||||||
|
mappings = {
|
||||||
|
["bd"] = "buffer_delete",
|
||||||
|
["<bs>"] = "navigate_up",
|
||||||
|
["."] = "set_root",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
git_status = {
|
||||||
|
window = {
|
||||||
|
position = "float",
|
||||||
|
mappings = {
|
||||||
|
["A"] = "git_add_all",
|
||||||
|
["gu"] = "git_unstage_file",
|
||||||
|
["ga"] = "git_add_file",
|
||||||
|
["gr"] = "git_revert_file",
|
||||||
|
["gc"] = "git_commit",
|
||||||
|
["gp"] = "git_push",
|
||||||
|
["gg"] = "git_commit_and_push",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,97 +1,97 @@
|
||||||
return function()
|
return function()
|
||||||
local myopts = require("custom_opts")
|
local myopts = require "custom_opts"
|
||||||
|
|
||||||
require("noice").setup({
|
require("noice").setup {
|
||||||
cmdline = {
|
cmdline = {
|
||||||
enabled = true, -- enables the Noice cmdline UI
|
enabled = true, -- enables the Noice cmdline UI
|
||||||
view = myopts.cmdline_view, -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
|
view = myopts.cmdline_view, -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom
|
||||||
opts = {}, -- global options for the cmdline. See section on views
|
opts = {}, -- global options for the cmdline. See section on views
|
||||||
---@type table<string, CmdlineFormat>
|
---@type table<string, CmdlineFormat>
|
||||||
format = {
|
format = {
|
||||||
-- conceal: (default=true) This will hide the text in the cmdline that matches the pattern.
|
-- conceal: (default=true) This will hide the text in the cmdline that matches the pattern.
|
||||||
-- view: (default is cmdline view)
|
-- view: (default is cmdline view)
|
||||||
-- opts: any options passed to the view
|
-- opts: any options passed to the view
|
||||||
-- icon_hl_group: optional hl_group for the icon
|
-- icon_hl_group: optional hl_group for the icon
|
||||||
-- title: set to anything or empty string to hide
|
-- title: set to anything or empty string to hide
|
||||||
cmdline = { pattern = "^:", icon = "", lang = "vim" },
|
cmdline = { pattern = "^:", icon = "", lang = "vim" },
|
||||||
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
|
search_down = { kind = "search", pattern = "^/", icon = " ", lang = "regex" },
|
||||||
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
|
search_up = { kind = "search", pattern = "^%?", icon = " ", lang = "regex" },
|
||||||
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
|
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
|
||||||
lua = {
|
lua = {
|
||||||
pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" },
|
pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" },
|
||||||
icon = "",
|
icon = "",
|
||||||
lang = "lua",
|
lang = "lua",
|
||||||
},
|
},
|
||||||
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
|
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
|
||||||
input = {}, -- Used by input()
|
input = {}, -- Used by input()
|
||||||
-- lua = false, -- to disable a format, set to `false`
|
-- lua = false, -- to disable a format, set to `false`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
messages = {
|
messages = {
|
||||||
-- NOTE: If you enable messages, then the cmdline is enabled automatically.
|
-- NOTE: If you enable messages, then the cmdline is enabled automatically.
|
||||||
-- This is a current Neovim limitation.
|
-- This is a current Neovim limitation.
|
||||||
enabled = not myopts.close_message_notify, -- enables the Noice messages UI
|
enabled = not myopts.close_message_notify, -- enables the Noice messages UI
|
||||||
view = "mini", -- default view for messages
|
view = "mini", -- default view for messages
|
||||||
view_error = "notify", -- view for errors
|
view_error = "notify", -- view for errors
|
||||||
view_warn = "notify", -- view for warnings
|
view_warn = "notify", -- view for warnings
|
||||||
view_history = "messages", -- view for :messages
|
view_history = "messages", -- view for :messages
|
||||||
view_search = false, -- view for search count messages. Set to `false` to disable
|
view_search = false, -- view for search count messages. Set to `false` to disable
|
||||||
},
|
},
|
||||||
lsp = {
|
lsp = {
|
||||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||||
override = {
|
override = {
|
||||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||||
["vim.lsp.util.stylize_markdown"] = true,
|
["vim.lsp.util.stylize_markdown"] = true,
|
||||||
["cmp.entry.get_documentation"] = true,
|
["cmp.entry.get_documentation"] = true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- you can enable a preset for easier configuration
|
-- you can enable a preset for easier configuration
|
||||||
presets = {
|
presets = {
|
||||||
bottom_search = true, -- use a classic bottom cmdline for search
|
bottom_search = true, -- use a classic bottom cmdline for search
|
||||||
command_palette = true, -- position the cmdline and popupmenu together
|
command_palette = true, -- position the cmdline and popupmenu together
|
||||||
long_message_to_split = true, -- long messages will be sent to a split
|
long_message_to_split = true, -- long messages will be sent to a split
|
||||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||||
},
|
},
|
||||||
views = {
|
views = {
|
||||||
cmdline_popup = {
|
cmdline_popup = {
|
||||||
position = {
|
position = {
|
||||||
row = "50%",
|
row = "50%",
|
||||||
col = "50%",
|
col = "50%",
|
||||||
},
|
},
|
||||||
size = {
|
size = {
|
||||||
width = 60,
|
width = 60,
|
||||||
height = "auto",
|
height = "auto",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
routes = {
|
routes = {
|
||||||
{
|
{
|
||||||
filter = {
|
filter = {
|
||||||
event = "msg_show",
|
event = "msg_show",
|
||||||
kind = "",
|
kind = "",
|
||||||
find = "已写入",
|
find = "已写入",
|
||||||
},
|
},
|
||||||
opts = { skip = true },
|
opts = { skip = true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
filter = {
|
filter = {
|
||||||
event = "msg_show",
|
event = "msg_show",
|
||||||
kind = "",
|
kind = "",
|
||||||
find = "written",
|
find = "written",
|
||||||
},
|
},
|
||||||
opts = { skip = true },
|
opts = { skip = true },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
notify = {
|
notify = {
|
||||||
-- Noice can be used as `vim.notify` so you can route any notification like other messages
|
-- Noice can be used as `vim.notify` so you can route any notification like other messages
|
||||||
-- Notification messages have their level and other properties set.
|
-- Notification messages have their level and other properties set.
|
||||||
-- event is always "notify" and kind can be any log level as a string
|
-- event is always "notify" and kind can be any log level as a string
|
||||||
-- The default routes will forward notifications to nvim-notify
|
-- The default routes will forward notifications to nvim-notify
|
||||||
-- Benefit of using Noice for this is the routing and consistent history view
|
-- Benefit of using Noice for this is the routing and consistent history view
|
||||||
enabled = true,
|
enabled = true,
|
||||||
view = "notify",
|
view = "notify",
|
||||||
replace = true,
|
replace = true,
|
||||||
},
|
},
|
||||||
})
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,44 +1,44 @@
|
||||||
return function()
|
return function()
|
||||||
require('nvim-web-devicons').setup {
|
require("nvim-web-devicons").setup {
|
||||||
-- your personnal icons can go here (to override)
|
-- your personnal icons can go here (to override)
|
||||||
-- you can specify color or cterm_color instead of specifying both of them
|
-- you can specify color or cterm_color instead of specifying both of them
|
||||||
-- DevIcon will be appended to `name`
|
-- DevIcon will be appended to `name`
|
||||||
override = {
|
override = {
|
||||||
zsh = {
|
zsh = {
|
||||||
icon = "",
|
icon = "",
|
||||||
color = "#428850",
|
color = "#428850",
|
||||||
cterm_color = "65",
|
cterm_color = "65",
|
||||||
name = "Zsh"
|
name = "Zsh",
|
||||||
}
|
},
|
||||||
};
|
},
|
||||||
-- globally enable different highlight colors per icon (default to true)
|
-- globally enable different highlight colors per icon (default to true)
|
||||||
-- if set to false all icons will have the default icon's color
|
-- if set to false all icons will have the default icon's color
|
||||||
color_icons = true;
|
color_icons = true,
|
||||||
-- globally enable default icons (default to false)
|
-- globally enable default icons (default to false)
|
||||||
-- will get overriden by `get_icons` option
|
-- will get overriden by `get_icons` option
|
||||||
default = true;
|
default = true,
|
||||||
-- globally enable "strict" selection of icons - icon will be looked up in
|
-- globally enable "strict" selection of icons - icon will be looked up in
|
||||||
-- different tables, first by filename, and if not found by extension; this
|
-- different tables, first by filename, and if not found by extension; this
|
||||||
-- prevents cases when file doesn't have any extension but still gets some icon
|
-- prevents cases when file doesn't have any extension but still gets some icon
|
||||||
-- because its name happened to match some extension (default to false)
|
-- because its name happened to match some extension (default to false)
|
||||||
strict = true;
|
strict = true,
|
||||||
-- same as `override` but specifically for overrides by filename
|
-- same as `override` but specifically for overrides by filename
|
||||||
-- takes effect when `strict` is true
|
-- takes effect when `strict` is true
|
||||||
override_by_filename = {
|
override_by_filename = {
|
||||||
[".gitignore"] = {
|
[".gitignore"] = {
|
||||||
icon = "",
|
icon = "",
|
||||||
color = "#f1502f",
|
color = "#f1502f",
|
||||||
name = "Gitignore"
|
name = "Gitignore",
|
||||||
}
|
},
|
||||||
};
|
},
|
||||||
-- same as `override` but specifically for overrides by extension
|
-- same as `override` but specifically for overrides by extension
|
||||||
-- takes effect when `strict` is true
|
-- takes effect when `strict` is true
|
||||||
override_by_extension = {
|
override_by_extension = {
|
||||||
["log"] = {
|
["log"] = {
|
||||||
icon = "",
|
icon = "",
|
||||||
color = "#81e043",
|
color = "#81e043",
|
||||||
name = "Log"
|
name = "Log",
|
||||||
}
|
},
|
||||||
};
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
return function()
|
return function()
|
||||||
require('smart-splits').setup({
|
require("smart-splits").setup {
|
||||||
ignored_filetypes = {
|
ignored_filetypes = {
|
||||||
'nofile',
|
"nofile",
|
||||||
'quickfix',
|
"quickfix",
|
||||||
'prompt',
|
"prompt",
|
||||||
'neo-tree',
|
"neo-tree",
|
||||||
},
|
},
|
||||||
ignored_buftypes = { 'NvimTree', 'neo-tree' },
|
ignored_buftypes = { "NvimTree", "neo-tree" },
|
||||||
})
|
}
|
||||||
|
|
||||||
local keys = require("custom_keys")
|
local keys = require "custom_keys"
|
||||||
local opttion = {noremap = true, silent = true }
|
local opttion = { noremap = true, silent = true }
|
||||||
|
|
||||||
vim.keymap.set({'n', 't'}, keys.resize_left, require('smart-splits').resize_left, option)
|
vim.keymap.set({ "n", "t" }, keys.resize_left, require("smart-splits").resize_left, option)
|
||||||
vim.keymap.set({'n', 't'}, keys.resize_down, require('smart-splits').resize_down, option)
|
vim.keymap.set({ "n", "t" }, keys.resize_down, require("smart-splits").resize_down, option)
|
||||||
vim.keymap.set({'n', 't'}, keys.resize_up, require('smart-splits').resize_up, option)
|
vim.keymap.set({ "n", "t" }, keys.resize_up, require("smart-splits").resize_up, option)
|
||||||
vim.keymap.set({'n', 't'}, keys.resize_right, require('smart-splits').resize_right, option)
|
vim.keymap.set({ "n", "t" }, keys.resize_right, require("smart-splits").resize_right, option)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,57 +1,57 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
requires = { "nvim-tree/nvim-web-devicons" },
|
requires = { "nvim-tree/nvim-web-devicons" },
|
||||||
setup = function()
|
setup = function()
|
||||||
vim.g.alpha_statusline = false
|
vim.g.alpha_statusline = false
|
||||||
end,
|
end,
|
||||||
config = function()
|
config = function()
|
||||||
local dashboard = require("alpha.themes.dashboard")
|
local dashboard = require "alpha.themes.dashboard"
|
||||||
|
|
||||||
-- header, it's a logo
|
-- header, it's a logo
|
||||||
dashboard.section.header.val = require("custom_opts").home_header
|
dashboard.section.header.val = require("custom_opts").home_header
|
||||||
dashboard.section.header.opts.hl = "HardHackerRed"
|
dashboard.section.header.opts.hl = "HardHackerRed"
|
||||||
|
|
||||||
-- footer
|
-- footer
|
||||||
local handle = io.popen("fortune")
|
local handle = io.popen "fortune"
|
||||||
local fortune = handle:read("*a")
|
local fortune = handle:read "*a"
|
||||||
handle:close()
|
handle:close()
|
||||||
dashboard.section.footer.val = fortune
|
dashboard.section.footer.val = fortune
|
||||||
|
|
||||||
-- button
|
-- button
|
||||||
local create_button = function(key, desc, action)
|
local create_button = function(key, desc, action)
|
||||||
local b = dashboard.button(key, desc, action)
|
local b = dashboard.button(key, desc, action)
|
||||||
b.opts.hl = "HardHackerComment"
|
b.opts.hl = "HardHackerComment"
|
||||||
b.opts.hl_shortcut = "HardHackerComment"
|
b.opts.hl_shortcut = "HardHackerComment"
|
||||||
b.opts.width = 40
|
b.opts.width = 40
|
||||||
return b
|
return b
|
||||||
end
|
end
|
||||||
dashboard.section.buttons.val = {
|
dashboard.section.buttons.val = {
|
||||||
create_button("f", " New file", ":ene <BAR> startinsert <CR>"),
|
create_button("f", " New file", ":ene <BAR> startinsert <CR>"),
|
||||||
create_button("s", " Load last session", ":SessionManager load_last_session<CR>"),
|
create_button("s", " Load last session", ":SessionManager load_last_session<CR>"),
|
||||||
-- create_button("e", " Select session", ":SessionManager load_session<CR>"),
|
-- create_button("e", " Select session", ":SessionManager load_session<CR>"),
|
||||||
create_button(
|
create_button(
|
||||||
"c",
|
"c",
|
||||||
" Open current directory",
|
" Open current directory",
|
||||||
":Neotree position=left source=filesystem action=focus toggle=true<CR>"
|
":Neotree position=left source=filesystem action=focus toggle=true<CR>"
|
||||||
),
|
),
|
||||||
create_button("q", " Quit", ":qa<CR>"),
|
create_button("q", " Quit", ":qa<CR>"),
|
||||||
}
|
}
|
||||||
|
|
||||||
-- config
|
-- config
|
||||||
dashboard.config.layout[1].val = vim.fn.max({ 3, vim.fn.floor(vim.fn.winheight(0) * 0.3) })
|
dashboard.config.layout[1].val = vim.fn.max { 3, vim.fn.floor(vim.fn.winheight(0) * 0.3) }
|
||||||
dashboard.config.layout[3].val = 5
|
dashboard.config.layout[3].val = 5
|
||||||
dashboard.config.opts.noautocmd = true
|
dashboard.config.opts.noautocmd = true
|
||||||
|
|
||||||
require("alpha").setup(dashboard.config)
|
require("alpha").setup(dashboard.config)
|
||||||
|
|
||||||
-- disable the tabline & statusline in alpha dashboard screen
|
-- disable the tabline & statusline in alpha dashboard screen
|
||||||
vim.cmd([[
|
vim.cmd [[
|
||||||
autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
|
autocmd User AlphaReady set showtabline=0 | autocmd BufUnload <buffer> set showtabline=2
|
||||||
autocmd User AlphaReady set laststatus=0 | autocmd BufUnload <buffer> set laststatus=3
|
autocmd User AlphaReady set laststatus=0 | autocmd BufUnload <buffer> set laststatus=3
|
||||||
autocmd User AlphaReady :NeoTreeClose
|
autocmd User AlphaReady :NeoTreeClose
|
||||||
autocmd User AlphaReady :AerialCloseAll
|
autocmd User AlphaReady :AerialCloseAll
|
||||||
]])
|
]]
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +1,53 @@
|
||||||
return {
|
return {
|
||||||
{
|
{
|
||||||
"akinsho/toggleterm.nvim",
|
"akinsho/toggleterm.nvim",
|
||||||
version = "*",
|
version = "*",
|
||||||
config = function()
|
config = function()
|
||||||
local copts = require("custom_opts")
|
local copts = require "custom_opts"
|
||||||
|
|
||||||
require("toggleterm").setup({
|
require("toggleterm").setup {
|
||||||
size = function(term)
|
size = function(term)
|
||||||
if term.direction == "horizontal" then
|
if term.direction == "horizontal" then
|
||||||
return 15
|
return 15
|
||||||
elseif term.direction == "vertical" then
|
elseif term.direction == "vertical" then
|
||||||
return vim.o.columns * 0.4
|
return vim.o.columns * 0.4
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
highlights = {
|
highlights = {
|
||||||
Normal = {
|
Normal = {
|
||||||
link = "Normal",
|
link = "Normal",
|
||||||
},
|
},
|
||||||
NormalFloat = {
|
NormalFloat = {
|
||||||
link = "Normal",
|
link = "Normal",
|
||||||
},
|
},
|
||||||
FloatBorder = {
|
FloatBorder = {
|
||||||
link = "FloatBorder",
|
link = "FloatBorder",
|
||||||
},
|
},
|
||||||
SignColumn = {
|
SignColumn = {
|
||||||
link = "EndOfBuffer",
|
link = "EndOfBuffer",
|
||||||
},
|
},
|
||||||
EndOfBuffer = {
|
EndOfBuffer = {
|
||||||
link = "EndOfBuffer",
|
link = "EndOfBuffer",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
float_opts = {
|
float_opts = {
|
||||||
border = "rounded",
|
border = "rounded",
|
||||||
-- winblend = copts.window_transparency,
|
-- winblend = copts.window_transparency,
|
||||||
width = function(term)
|
width = function(term)
|
||||||
local columns = vim.api.nvim_get_option("columns")
|
local columns = vim.api.nvim_get_option "columns"
|
||||||
local w = math.floor(columns * copts.terminal_size)
|
local w = math.floor(columns * copts.terminal_size)
|
||||||
return (w < 20) and 20 or w
|
return (w < 20) and 20 or w
|
||||||
end,
|
end,
|
||||||
height = function(term)
|
height = function(term)
|
||||||
local lines = vim.api.nvim_get_option("lines")
|
local lines = vim.api.nvim_get_option "lines"
|
||||||
local h = math.floor(lines * (copts.terminal_size + 0.1))
|
local h = math.floor(lines * (copts.terminal_size + 0.1))
|
||||||
return (h < 35) and 35 or h
|
return (h < 35) and 35 or h
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
persist_size = true,
|
persist_size = true,
|
||||||
persist_mode = true,
|
persist_mode = true,
|
||||||
autochdir = true,
|
autochdir = true,
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,104 +1,104 @@
|
||||||
return {
|
return {
|
||||||
{ "rcarriga/nvim-notify" },
|
{ "rcarriga/nvim-notify" },
|
||||||
|
|
||||||
-- resize the window
|
-- resize the window
|
||||||
{
|
{
|
||||||
"mrjones2014/smart-splits.nvim",
|
"mrjones2014/smart-splits.nvim",
|
||||||
version = "v1.2.2",
|
version = "v1.2.2",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/smart-split/config")()
|
require "plugins/smart-split/config"()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- buffer delete
|
-- buffer delete
|
||||||
{ "famiu/bufdelete.nvim" },
|
{ "famiu/bufdelete.nvim" },
|
||||||
|
|
||||||
-- session
|
-- session
|
||||||
{
|
{
|
||||||
"Shatur/neovim-session-manager",
|
"Shatur/neovim-session-manager",
|
||||||
dependencies = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
local Path = require("plenary.path")
|
local Path = require "plenary.path"
|
||||||
local config = require("session_manager.config")
|
local config = require "session_manager.config"
|
||||||
require("session_manager").setup({
|
require("session_manager").setup {
|
||||||
sessions_dir = Path:new(vim.fn.stdpath("data"), "sessions"), -- The directory where the session files will be saved.
|
sessions_dir = Path:new(vim.fn.stdpath "data", "sessions"), -- The directory where the session files will be saved.
|
||||||
session_filename_to_dir = session_filename_to_dir, -- Function that replaces symbols into separators and colons to transform filename into a session directory.
|
session_filename_to_dir = session_filename_to_dir, -- Function that replaces symbols into separators and colons to transform filename into a session directory.
|
||||||
dir_to_session_filename = dir_to_session_filename, -- Function that replaces separators and colons into special symbols to transform session directory into a filename. Should use `vim.loop.cwd()` if the passed `dir` is `nil`.
|
dir_to_session_filename = dir_to_session_filename, -- Function that replaces separators and colons into special symbols to transform session directory into a filename. Should use `vim.loop.cwd()` if the passed `dir` is `nil`.
|
||||||
autoload_mode = config.AutoloadMode.Disabled, -- Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession
|
autoload_mode = config.AutoloadMode.Disabled, -- Define what to do when Neovim is started without arguments. Possible values: Disabled, CurrentDir, LastSession
|
||||||
autosave_last_session = true, -- Automatically save last session on exit and on session switch.
|
autosave_last_session = true, -- Automatically save last session on exit and on session switch.
|
||||||
autosave_ignore_not_normal = true, -- Plugin will not save a session when no buffers are opened, or all of them aren't writable or listed.
|
autosave_ignore_not_normal = true, -- Plugin will not save a session when no buffers are opened, or all of them aren't writable or listed.
|
||||||
autosave_ignore_dirs = { "/", "~", "/tmp/" }, -- A list of directories where the session will not be autosaved.
|
autosave_ignore_dirs = { "/", "~", "/tmp/" }, -- A list of directories where the session will not be autosaved.
|
||||||
autosave_ignore_filetypes = { -- All buffers of these file types will be closed before the session is saved.
|
autosave_ignore_filetypes = { -- All buffers of these file types will be closed before the session is saved.
|
||||||
"gitcommit",
|
"gitcommit",
|
||||||
"gitrebase",
|
"gitrebase",
|
||||||
},
|
},
|
||||||
autosave_ignore_buftypes = {}, -- All buffers of these bufer types will be closed before the session is saved.
|
autosave_ignore_buftypes = {}, -- All buffers of these bufer types will be closed before the session is saved.
|
||||||
autosave_only_in_session = false, -- Always autosaves session. If true, only autosaves after a session is active.
|
autosave_only_in_session = false, -- Always autosaves session. If true, only autosaves after a session is active.
|
||||||
max_path_length = 80, -- Shorten the display path if length exceeds this threshold. Use 0 if don't want to shorten the path at all.
|
max_path_length = 80, -- Shorten the display path if length exceeds this threshold. Use 0 if don't want to shorten the path at all.
|
||||||
})
|
}
|
||||||
|
|
||||||
-- automatic open neotree sidebar when a session opened
|
-- automatic open neotree sidebar when a session opened
|
||||||
local hardhacker_config_group = vim.api.nvim_create_augroup("HardHackerConfigGroup", {})
|
local hardhacker_config_group = vim.api.nvim_create_augroup("HardHackerConfigGroup", {})
|
||||||
vim.api.nvim_create_autocmd({ "User" }, {
|
vim.api.nvim_create_autocmd({ "User" }, {
|
||||||
pattern = "SessionLoadPost",
|
pattern = "SessionLoadPost",
|
||||||
group = hardhacker_config_group,
|
group = hardhacker_config_group,
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.api.nvim_command("Neotree position=left source=filesystem action=show")
|
vim.api.nvim_command "Neotree position=left source=filesystem action=show"
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
-- zen-mode
|
-- zen-mode
|
||||||
{
|
{
|
||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
window = {
|
window = {
|
||||||
backdrop = 1, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
backdrop = 1, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
||||||
-- height and width can be:
|
-- height and width can be:
|
||||||
-- * an absolute number of cells when > 1
|
-- * an absolute number of cells when > 1
|
||||||
-- * a percentage of the width / height of the editor when <= 1
|
-- * a percentage of the width / height of the editor when <= 1
|
||||||
-- * a function that returns the width or the height
|
-- * a function that returns the width or the height
|
||||||
width = 120, -- width of the Zen window
|
width = 120, -- width of the Zen window
|
||||||
height = 0.9, -- height of the Zen window
|
height = 0.9, -- height of the Zen window
|
||||||
-- by default, no options are changed for the Zen window
|
-- by default, no options are changed for the Zen window
|
||||||
-- uncomment any of the options below, or add other vim.wo options you want to apply
|
-- uncomment any of the options below, or add other vim.wo options you want to apply
|
||||||
options = {
|
options = {
|
||||||
signcolumn = "no", -- disable signcolumn
|
signcolumn = "no", -- disable signcolumn
|
||||||
number = false, -- disable number column
|
number = false, -- disable number column
|
||||||
relativenumber = false, -- disable relative numbers
|
relativenumber = false, -- disable relative numbers
|
||||||
cursorline = false, -- disable cursorline
|
cursorline = false, -- disable cursorline
|
||||||
cursorcolumn = false, -- disable cursor column
|
cursorcolumn = false, -- disable cursor column
|
||||||
foldcolumn = "0", -- disable fold column
|
foldcolumn = "0", -- disable fold column
|
||||||
list = false, -- disable whitespace characters
|
list = false, -- disable whitespace characters
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- callback where you can add custom code when the Zen window opens
|
-- callback where you can add custom code when the Zen window opens
|
||||||
on_open = function(win) end,
|
on_open = function(win) end,
|
||||||
-- callback where you can add custom code when the Zen window closes
|
-- callback where you can add custom code when the Zen window closes
|
||||||
on_close = function() end,
|
on_close = function() end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"folke/twilight.nvim",
|
"folke/twilight.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
dimming = {
|
dimming = {
|
||||||
alpha = 0.25, -- amount of dimming
|
alpha = 0.25, -- amount of dimming
|
||||||
-- we try to get the foreground from the highlight groups or fallback color
|
-- we try to get the foreground from the highlight groups or fallback color
|
||||||
-- color = { "Normal", "#eee9fc" },
|
-- color = { "Normal", "#eee9fc" },
|
||||||
-- term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color
|
-- term_bg = "#000000", -- if guibg=NONE, this will be used to calculate text color
|
||||||
inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer)
|
inactive = false, -- when true, other windows will be fully dimmed (unless they contain the same buffer)
|
||||||
},
|
},
|
||||||
context = 10, -- amount of lines we will try to show around the current line
|
context = 10, -- amount of lines we will try to show around the current line
|
||||||
treesitter = true, -- use treesitter when available for the filetype
|
treesitter = true, -- use treesitter when available for the filetype
|
||||||
-- treesitter is used to automatically expand the visible text,
|
-- treesitter is used to automatically expand the visible text,
|
||||||
-- but you can further control the types of nodes that should always be fully expanded
|
-- but you can further control the types of nodes that should always be fully expanded
|
||||||
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
|
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
|
||||||
"function",
|
"function",
|
||||||
"method",
|
"method",
|
||||||
"table",
|
"table",
|
||||||
"if_statement",
|
"if_statement",
|
||||||
},
|
},
|
||||||
exclude = {}, -- exclude these filetypes
|
exclude = {}, -- exclude these filetypes
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,101 +1,101 @@
|
||||||
return {
|
return {
|
||||||
-- winbar
|
-- winbar
|
||||||
{
|
{
|
||||||
"utilyre/barbecue.nvim",
|
"utilyre/barbecue.nvim",
|
||||||
name = "barbecue",
|
name = "barbecue",
|
||||||
version = "*",
|
version = "*",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"SmiteshP/nvim-navic",
|
"SmiteshP/nvim-navic",
|
||||||
"nvim-tree/nvim-web-devicons", -- optional dependency
|
"nvim-tree/nvim-web-devicons", -- optional dependency
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("barbecue").setup({
|
require("barbecue").setup {
|
||||||
create_autocmd = false, -- prevent barbecue from updating itself automatically
|
create_autocmd = false, -- prevent barbecue from updating itself automatically
|
||||||
theme = vim.g.hardhacker_barbecue_theme,
|
theme = vim.g.hardhacker_barbecue_theme,
|
||||||
})
|
}
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({
|
vim.api.nvim_create_autocmd({
|
||||||
"WinScrolled", -- or WinResized on NVIM-v0.9 and higher
|
"WinScrolled", -- or WinResized on NVIM-v0.9 and higher
|
||||||
"BufWinEnter",
|
"BufWinEnter",
|
||||||
"CursorHold",
|
"CursorHold",
|
||||||
"InsertLeave",
|
"InsertLeave",
|
||||||
|
|
||||||
-- include this if you have set `show_modified` to `true`
|
-- include this if you have set `show_modified` to `true`
|
||||||
"BufModifiedSet",
|
"BufModifiedSet",
|
||||||
}, {
|
}, {
|
||||||
group = vim.api.nvim_create_augroup("barbecue.updater", {}),
|
group = vim.api.nvim_create_augroup("barbecue.updater", {}),
|
||||||
callback = function()
|
callback = function()
|
||||||
require("barbecue.ui").update()
|
require("barbecue.ui").update()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Status line
|
-- Status line
|
||||||
{
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
dependencies = { "nvim-tree/nvim-web-devicons", opt = true },
|
dependencies = { "nvim-tree/nvim-web-devicons", opt = true },
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/lualine/config")()
|
require "plugins/lualine/config"()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- File explorer
|
-- File explorer
|
||||||
{
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v2.x",
|
branch = "v2.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/neo-tree/config")()
|
require "plugins/neo-tree/config"()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Outline
|
-- Outline
|
||||||
{
|
{
|
||||||
"stevearc/aerial.nvim",
|
"stevearc/aerial.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
-- Optional dependencies
|
-- Optional dependencies
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("aerial").setup({
|
require("aerial").setup {
|
||||||
lazy_load = false,
|
lazy_load = false,
|
||||||
open_automatic = require("custom_opts").auto_open_outline,
|
open_automatic = require("custom_opts").auto_open_outline,
|
||||||
})
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Tab line
|
-- Tab line
|
||||||
{
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
version = "v4.1.0",
|
version = "v4.1.0",
|
||||||
dependencies = "nvim-tree/nvim-web-devicons",
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/bufferline/config")()
|
require "plugins/bufferline/config"()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- cmd line
|
-- cmd line
|
||||||
{
|
{
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins/noice/config")()
|
require "plugins/noice/config"()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Improve the ui
|
-- Improve the ui
|
||||||
{
|
{
|
||||||
"stevearc/dressing.nvim",
|
"stevearc/dressing.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue