mirror of
https://github.com/ksyasuda/rice.git
synced 2025-12-06 20:53:36 -08:00
update
This commit is contained in:
85
nvim/plugin-confs/bufferline.lua
Normal file
85
nvim/plugin-confs/bufferline.lua
Normal file
@@ -0,0 +1,85 @@
|
||||
require('bufferline').setup {
|
||||
options = {
|
||||
-- numbers = function(opts)
|
||||
-- return string.format("%s", opts.id)
|
||||
-- end,
|
||||
numbers = function(opts)
|
||||
return ""
|
||||
end,
|
||||
-- number_style = "superscript" | "subscript" | "" | { "none", "subscript" }, -- buffer_id at index 1, ordinal at index 2
|
||||
-- number_style = "none",
|
||||
close_command = "bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
right_mouse_command = "bdelete! %d", -- can be a string | function, see "Mouse actions"
|
||||
left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions"
|
||||
middle_mouse_command = nil, -- can be a string | function, see "Mouse actions"
|
||||
-- NOTE: this plugin is designed with this icon in mind,
|
||||
-- and so changing this is NOT recommended, this is intended
|
||||
-- as an escape hatch for people who cannot bear it for whatever reason
|
||||
indicator_icon = '▎',
|
||||
buffer_close_icon = '',
|
||||
modified_icon = '●',
|
||||
close_icon = '',
|
||||
left_trunc_marker = '',
|
||||
right_trunc_marker = '',
|
||||
--- name_formatter can be used to change the buffer's label in the bufferline.
|
||||
--- Please note some names can/will break the
|
||||
--- bufferline so use this at your discretion knowing that it has
|
||||
--- some limitations that will *NOT* be fixed.
|
||||
name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr"
|
||||
-- remove extension from markdown files for example
|
||||
if buf.name:match('%.md') then
|
||||
return vim.fn.fnamemodify(buf.name, ':t:r')
|
||||
end
|
||||
end,
|
||||
max_name_length = 18,
|
||||
max_prefix_length = 15, -- prefix used when a buffer is de-duplicated
|
||||
tab_size = 18,
|
||||
-- diagnostics = false | "nvim_lsp" | "coc",
|
||||
diagnostics = "coc",
|
||||
diagnostics_update_in_insert = false,
|
||||
diagnostics_indicator = function(count, level, diagnostics_dict, context)
|
||||
local s = " "
|
||||
for e, n in pairs(diagnostics_dict) do
|
||||
local sym = e == "error" and " "
|
||||
or e == "hint" and " "
|
||||
or (e == "warning" and " " or "" )
|
||||
s = s .. n .. sym
|
||||
end
|
||||
return s
|
||||
end,
|
||||
custom_filter = function(buf_number, buf_numbers)
|
||||
-- filter out filetypes you don't want to see
|
||||
if vim.bo[buf_number].filetype ~= "<i-dont-want-to-see-this>" then
|
||||
return true
|
||||
end
|
||||
-- filter out by buffer name
|
||||
if vim.fn.bufname(buf_number) ~= "<buffer-name-I-dont-want>" then
|
||||
return true
|
||||
end
|
||||
-- filter out based on arbitrary rules
|
||||
-- e.g. filter out vim wiki buffer from tabline in your work repo
|
||||
if vim.fn.getcwd() == "<work-repo>" and vim.bo[buf_number].filetype ~= "wiki" then
|
||||
return true
|
||||
end
|
||||
-- filter out by it's index number in list (don't show first buffer)
|
||||
if buf_numbers[1] ~= buf_number then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
-- offsets = {{filetype = "NvimTree", text = "File Explorer" | function , text_align = "left" | "center" | "right"}},
|
||||
-- offsets = text_align = "left" | "center" | "right"}},
|
||||
show_buffer_icons = true,
|
||||
show_buffer_close_icons = true,
|
||||
show_close_icon = false,
|
||||
show_tab_indicators = true,
|
||||
persist_buffer_sort = false, -- whether or not custom sorted buffers should persist
|
||||
-- can also be a table containing 2 custom separators
|
||||
-- [focused and unfocused]. eg: { '|', '|' }
|
||||
-- separator_style = "slant" | "thick" | "thin" | { 'any', 'any' },
|
||||
separator_style = "thick",
|
||||
enforce_regular_tabs = false,
|
||||
always_show_bufferline = true,
|
||||
-- sort_by = 'id' | 'extension' | 'relative_directory' | 'directory' | 'tabs' | function(buffer_a, buffer_b)
|
||||
sort_by = 'id',
|
||||
}
|
||||
}
|
||||
8
nvim/plugin-confs/dashboard-art.vim
Normal file
8
nvim/plugin-confs/dashboard-art.vim
Normal file
@@ -0,0 +1,8 @@
|
||||
let g:dashboard_custom_header = [
|
||||
\ ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗',
|
||||
\ ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║',
|
||||
\ ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║',
|
||||
\ ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║',
|
||||
\ ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║',
|
||||
\ ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝',
|
||||
\]
|
||||
1
nvim/plugin-confs/dashboard-nvim.lua
Normal file
1
nvim/plugin-confs/dashboard-nvim.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.g.dashboard_default_executive = 'fzf'
|
||||
27
nvim/plugin-confs/doomone.lua
Normal file
27
nvim/plugin-confs/doomone.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
require('doom-one').setup({
|
||||
cursor_coloring = false,
|
||||
terminal_colors = false,
|
||||
italic_comments = false,
|
||||
enable_treesitter = true,
|
||||
transparent_background = false,
|
||||
pumblend = {
|
||||
enable = true,
|
||||
transparency_amount = 20,
|
||||
},
|
||||
plugins_integrations = {
|
||||
neorg = true,
|
||||
barbar = true,
|
||||
bufferline = false,
|
||||
gitgutter = false,
|
||||
gitsigns = true,
|
||||
telescope = false,
|
||||
neogit = true,
|
||||
nvim_tree = true,
|
||||
dashboard = true,
|
||||
startify = true,
|
||||
whichkey = true,
|
||||
indent_blankline = true,
|
||||
vim_illuminate = true,
|
||||
lspsaga = false,
|
||||
},
|
||||
})
|
||||
33
nvim/plugin-confs/dracula.lua
Normal file
33
nvim/plugin-confs/dracula.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
-- customize dracula color palette
|
||||
vim.g.dracula_colors = {
|
||||
bg = "#282A36",
|
||||
fg = "#F8F8F2",
|
||||
selection = "#44475A",
|
||||
comment = "#6272A4",
|
||||
red = "#FF5555",
|
||||
orange = "#FFB86C",
|
||||
yellow = "#F1FA8C",
|
||||
green = "#50fa7b",
|
||||
purple = "#BD93F9",
|
||||
cyan = "#8BE9FD",
|
||||
pink = "#FF79C6",
|
||||
bright_red = "#FF6E6E",
|
||||
bright_green = "#69FF94",
|
||||
bright_yellow = "#FFFFA5",
|
||||
bright_blue = "#D6ACFF",
|
||||
bright_magenta = "#FF92DF",
|
||||
bright_cyan = "#A4FFFF",
|
||||
bright_white = "#FFFFFF",
|
||||
menu = "#21222C",
|
||||
visual = "#3E4452",
|
||||
gutter_fg = "#4B5263",
|
||||
nontext = "#3B4048",
|
||||
}
|
||||
-- show the '~' characters after the end of buffers
|
||||
vim.g.dracula_show_end_of_buffer = true
|
||||
-- use transparent background
|
||||
vim.g.dracula_transparent_bg = true
|
||||
-- set custom lualine background color
|
||||
vim.g.dracula_lualine_bg_color = "#44475a"
|
||||
-- set italic comment
|
||||
vim.g.dracula_italic_comment = true
|
||||
19
nvim/plugin-confs/github-theme.lua
Normal file
19
nvim/plugin-confs/github-theme.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Example config in Lua
|
||||
require("github-theme").setup({
|
||||
theme_style = "dark",
|
||||
function_style = "italic",
|
||||
sidebars = {"qf", "vista_kind", "terminal", "packer"},
|
||||
|
||||
-- Change the "hint" color to the "orange" color, and make the "error" color bright red
|
||||
colors = {hint = "orange", error = "#ff0000"},
|
||||
|
||||
-- Overwrite the highlight groups
|
||||
overrides = function(c)
|
||||
return {
|
||||
htmlTag = {fg = c.red, bg = "#282c34", sp = c.hint, style = "underline"},
|
||||
DiagnosticHint = {link = "LspDiagnosticsDefaultHint"},
|
||||
-- this will remove the highlight groups
|
||||
TSField = {},
|
||||
}
|
||||
end
|
||||
})
|
||||
56
nvim/plugin-confs/lsp-signature.lua
Normal file
56
nvim/plugin-confs/lsp-signature.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
cfg = {
|
||||
debug = false, -- set to true to enable debug logging
|
||||
log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
|
||||
-- default is ~/.cache/nvim/lsp_signature.log
|
||||
verbose = false, -- show debug line number
|
||||
|
||||
bind = true, -- This is mandatory, otherwise border config won't get registered.
|
||||
-- If you want to hook lspsaga or other signature handler, pls set to false
|
||||
doc_lines = 10, -- will show two lines of comment/doc(if there are more than two lines in doc, will be truncated);
|
||||
-- set to 0 if you DO NOT want any API comments be shown
|
||||
-- This setting only take effect in insert mode, it does not affect signature help in normal
|
||||
-- mode, 10 by default
|
||||
|
||||
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode
|
||||
|
||||
floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note:
|
||||
-- will set to true when fully tested, set to false will use whichever side has more space
|
||||
-- this setting will be helpful if you do not want the PUM and floating win overlap
|
||||
|
||||
floating_window_off_x = 1, -- adjust float windows x position.
|
||||
floating_window_off_y = 1, -- adjust float windows y position.
|
||||
|
||||
|
||||
fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
|
||||
hint_enable = true, -- virtual hint enable
|
||||
hint_prefix = "🐼 ", -- Panda for parameter
|
||||
hint_scheme = "String",
|
||||
hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight
|
||||
max_height = 12, -- max height of signature floating_window, if content is more than max_height, you can scroll down
|
||||
-- to view the hiding contents
|
||||
max_width = 80, -- max_width of signature floating_window, line will be wrapped if exceed max_width
|
||||
handler_opts = {
|
||||
border = "rounded" -- double, rounded, single, shadow, none
|
||||
},
|
||||
|
||||
always_trigger = false, -- sometime show signature on new line or in middle of parameter can be confusing, set it to false for #58
|
||||
|
||||
auto_close_after = nil, -- autoclose signature float win after x sec, disabled if nil.
|
||||
extra_trigger_chars = {}, -- Array of extra characters that will trigger signature completion, e.g., {"(", ","}
|
||||
zindex = 200, -- by default it will be on top of all floating windows, set to <= 50 send it to bottom
|
||||
|
||||
padding = '', -- character to pad on left and right of signature can be ' ', or '|' etc
|
||||
|
||||
transparency = nil, -- disabled by default, allow floating win transparent value 1~100
|
||||
shadow_blend = 36, -- if you using shadow as border use this set the opacity
|
||||
shadow_guibg = 'Black', -- if you using shadow as border use this set the color e.g. 'Green' or '#121315'
|
||||
timer_interval = 200, -- default timer check interval set to lower value if you want to reduce latency
|
||||
toggle_key = nil -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
|
||||
}
|
||||
|
||||
-- recommended:
|
||||
require'lsp_signature'.setup(cfg) -- no need to specify bufnr if you don't use toggle_key
|
||||
|
||||
-- You can also do this inside lsp on_attach
|
||||
-- note: on_attach deprecated
|
||||
-- require'lsp_signature'.on_attach(cfg, bufnr) -- no need to specify bufnr if you don't use toggle_key
|
||||
62
nvim/plugin-confs/lspconfig.lua
Normal file
62
nvim/plugin-confs/lspconfig.lua
Normal file
@@ -0,0 +1,62 @@
|
||||
local DEFAULT_SETTINGS = {
|
||||
ui = {
|
||||
icons = {
|
||||
-- The list icon to use for installed servers.
|
||||
server_installed = "◍",
|
||||
-- The list icon to use for servers that are pending installation.
|
||||
server_pending = "◍",
|
||||
-- The list icon to use for servers that are not installed.
|
||||
server_uninstalled = "◍",
|
||||
},
|
||||
keymaps = {
|
||||
-- Keymap to expand a server in the UI
|
||||
toggle_server_expand = "<CR>",
|
||||
-- Keymap to install a server
|
||||
install_server = "i",
|
||||
-- Keymap to reinstall/update a server
|
||||
update_server = "u",
|
||||
-- Keymap to update all installed servers
|
||||
update_all_servers = "U",
|
||||
-- Keymap to uninstall a server
|
||||
uninstall_server = "X",
|
||||
},
|
||||
},
|
||||
|
||||
-- The directory in which to install all servers.
|
||||
install_root_dir = "~/.vim/lsp",
|
||||
|
||||
pip = {
|
||||
-- These args will be added to `pip install` calls. Note that setting extra args might impact intended behavior
|
||||
-- and is not recommended.
|
||||
--
|
||||
-- Example: { "--proxy", "https://proxyserver" }
|
||||
install_args = {},
|
||||
},
|
||||
|
||||
-- Controls to which degree logs are written to the log file. It's useful to set this to vim.log.levels.DEBUG when
|
||||
-- debugging issues with server installations.
|
||||
log_level = vim.log.levels.INFO,
|
||||
|
||||
-- Limit for the maximum amount of servers to be installed at the same time. Once this limit is reached, any further
|
||||
-- servers that are requested to be installed will be put in a queue.
|
||||
max_concurrent_installers = 4,
|
||||
}
|
||||
|
||||
|
||||
local lsp_installer = require("nvim-lsp-installer")
|
||||
|
||||
-- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished
|
||||
-- or if the server is already installed).
|
||||
lsp_installer.on_server_ready(function(server)
|
||||
local opts = {}
|
||||
|
||||
-- (optional) Customize the options passed to the server
|
||||
-- if server.name == "tsserver" then
|
||||
-- opts.root_dir = function() ... end
|
||||
-- end
|
||||
|
||||
-- This setup() function will take the provided server configuration and decorate it with the necessary properties
|
||||
-- before passing it onwards to lspconfig.
|
||||
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
server:setup(DEFAULT_SETTINGS)
|
||||
end)
|
||||
31
nvim/plugin-confs/marks.lua
Normal file
31
nvim/plugin-confs/marks.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
require'marks'.setup {
|
||||
-- whether to map keybinds or not. default true
|
||||
default_mappings = true,
|
||||
-- which builtin marks to show. default {}
|
||||
builtin_marks = { ".", "<", ">", "^" },
|
||||
-- whether movements cycle back to the beginning/end of buffer. default true
|
||||
cyclic = true,
|
||||
-- whether the shada file is updated after modifying uppercase marks. default false
|
||||
force_write_shada = false,
|
||||
-- how often (in ms) to redraw signs/recompute mark positions.
|
||||
-- higher values will have better performance but may cause visual lag,
|
||||
-- while lower values may cause performance penalties. default 150.
|
||||
refresh_interval = 250,
|
||||
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
|
||||
-- marks, and bookmarks.
|
||||
-- can be either a table with all/none of the keys, or a single number, in which case
|
||||
-- the priority applies to all marks.
|
||||
-- default 10.
|
||||
sign_priority = { lower=10, upper=15, builtin=8, bookmark=20 },
|
||||
-- disables mark tracking for specific filetypes. default {}
|
||||
excluded_filetypes = {},
|
||||
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
|
||||
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
|
||||
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
|
||||
-- default virt_text is "".
|
||||
bookmark_0 = {
|
||||
sign = "⚑",
|
||||
virt_text = "hello world"
|
||||
},
|
||||
mappings = {}
|
||||
}
|
||||
73
nvim/plugin-confs/neogit.lua
Normal file
73
nvim/plugin-confs/neogit.lua
Normal file
@@ -0,0 +1,73 @@
|
||||
local neogit = require("neogit")
|
||||
|
||||
neogit.setup {
|
||||
disable_signs = false,
|
||||
disable_hint = false,
|
||||
disable_context_highlighting = false,
|
||||
disable_commit_confirmation = false,
|
||||
auto_refresh = true,
|
||||
disable_builtin_notifications = false,
|
||||
use_magit_keybindings = false,
|
||||
commit_popup = {
|
||||
kind = "split",
|
||||
},
|
||||
-- Change the default way of opening neogit
|
||||
kind = "tab",
|
||||
-- kind = "vsplit",
|
||||
-- customize displayed signs
|
||||
signs = {
|
||||
-- { CLOSED, OPENED }
|
||||
section = { ">", "v" },
|
||||
item = { ">", "v" },
|
||||
hunk = { "", "" },
|
||||
},
|
||||
integrations = {
|
||||
-- Neogit only provides inline diffs. If you want a more traditional way to look at diffs, you can use `sindrets/diffview.nvim`.
|
||||
-- The diffview integration enables the diff popup, which is a wrapper around `sindrets/diffview.nvim`.
|
||||
--
|
||||
-- Requires you to have `sindrets/diffview.nvim` installed.
|
||||
-- use {
|
||||
-- 'TimUntersberger/neogit',
|
||||
-- requires = {
|
||||
-- 'nvim-lua/plenary.nvim',
|
||||
-- 'sindrets/diffview.nvim'
|
||||
-- }
|
||||
-- }
|
||||
--
|
||||
diffview = false
|
||||
},
|
||||
-- Setting any section to `false` will make the section not render at all
|
||||
sections = {
|
||||
untracked = {
|
||||
folded = false
|
||||
},
|
||||
unstaged = {
|
||||
folded = false
|
||||
},
|
||||
staged = {
|
||||
folded = false
|
||||
},
|
||||
stashes = {
|
||||
folded = true
|
||||
},
|
||||
unpulled = {
|
||||
folded = true
|
||||
},
|
||||
unmerged = {
|
||||
folded = false
|
||||
},
|
||||
recent = {
|
||||
folded = true
|
||||
},
|
||||
},
|
||||
-- override/add mappings
|
||||
mappings = {
|
||||
-- modify status buffer mappings
|
||||
status = {
|
||||
-- Adds a mapping with "B" as key that does the "BranchPopup" command
|
||||
["B"] = "BranchPopup",
|
||||
-- Removes the default mapping of "s"
|
||||
["s"] = "",
|
||||
}
|
||||
}
|
||||
}
|
||||
86
nvim/plugin-confs/null-ls.lua
Normal file
86
nvim/plugin-confs/null-ls.lua
Normal file
@@ -0,0 +1,86 @@
|
||||
local null_ls = require("null-ls")
|
||||
local helpers = require("null-ls.helpers")
|
||||
|
||||
require("null-ls").setup({
|
||||
sources = {
|
||||
require("null-ls").builtins.formatting.stylua,
|
||||
require("null-ls").builtins.diagnostics.eslint,
|
||||
require("null-ls").builtins.completion.spell,
|
||||
require("null-ls").builtins.formatting.shfmt.with({
|
||||
extra_args = { "-i", "4", "-ci", "-sr" }
|
||||
}),
|
||||
},
|
||||
})
|
||||
|
||||
local markdownlint = {
|
||||
method = null_ls.methods.DIAGNOSTICS,
|
||||
filetypes = { "markdown" },
|
||||
-- null_ls.generator creates an async source
|
||||
-- that spawns the command with the given arguments and options
|
||||
generator = null_ls.generator({
|
||||
command = "markdownlint",
|
||||
args = { "--stdin" },
|
||||
to_stdin = true,
|
||||
from_stderr = true,
|
||||
-- choose an output format (raw, json, or line)
|
||||
format = "line",
|
||||
check_exit_code = function(code, stderr)
|
||||
local success = code <= 1
|
||||
|
||||
if not success then
|
||||
-- can be noisy for things that run often (e.g. diagnostics), but can
|
||||
-- be useful for things that run on demand (e.g. formatting)
|
||||
print(stderr)
|
||||
end
|
||||
|
||||
return success
|
||||
end,
|
||||
-- use helpers to parse the output from string matchers,
|
||||
-- or parse it manually with a function
|
||||
on_output = helpers.diagnostics.from_patterns({
|
||||
{
|
||||
pattern = [[:(%d+):(%d+) [%w-/]+ (.*)]],
|
||||
groups = { "row", "col", "message" },
|
||||
},
|
||||
{
|
||||
pattern = [[:(%d+) [%w-/]+ (.*)]],
|
||||
groups = { "row", "message" },
|
||||
},
|
||||
}),
|
||||
}),
|
||||
}
|
||||
|
||||
local shellcheck = {
|
||||
method = null_ls.methods.DIAGNOSTICS,
|
||||
filetypes = { "sh", "bash", "zsh", "fish" },
|
||||
generator = null_ls.generator({
|
||||
command = "shellcheck",
|
||||
args = { "-S", "info", "-s", "bash", "-o", "all", "-e", "2250" },
|
||||
from_stderr = true,
|
||||
format = "line",
|
||||
check_exit_code = function(code, stderr)
|
||||
local success = code <= 1
|
||||
|
||||
if not success then
|
||||
-- can be noisy for things that run often (e.g. diagnostics), but can
|
||||
-- be useful for things that run on demand (e.g. formatting)
|
||||
print(stderr)
|
||||
end
|
||||
|
||||
return success
|
||||
end,
|
||||
on_output = helpers.diagnostics.from_patterns({
|
||||
{
|
||||
pattern = [[:(%d+):(%d+) [%w-/]+ (.*)]],
|
||||
groups = { "row", "col", "message" },
|
||||
},
|
||||
{
|
||||
pattern = [[:(%d+) [%w-/]+ (.*)]],
|
||||
groups = { "row", "message" },
|
||||
},
|
||||
}),
|
||||
}),
|
||||
}
|
||||
|
||||
null_ls.register(markdownlint)
|
||||
null_ls.register(shellcheck)
|
||||
106
nvim/plugin-confs/nvimtree.lua
Normal file
106
nvim/plugin-confs/nvimtree.lua
Normal file
@@ -0,0 +1,106 @@
|
||||
require'nvim-tree'.setup {
|
||||
disable_netrw = false,
|
||||
hijack_netrw = false,
|
||||
open_on_setup = false,
|
||||
ignore_ft_on_setup = {},
|
||||
auto_close = false,
|
||||
open_on_tab = false,
|
||||
hijack_cursor = false,
|
||||
update_cwd = false,
|
||||
update_to_buf_dir = {
|
||||
enable = true,
|
||||
auto_open = true,
|
||||
},
|
||||
diagnostics = {
|
||||
enable = true,
|
||||
icons = {
|
||||
hint = "",
|
||||
info = "",
|
||||
warning = "",
|
||||
error = "",
|
||||
}
|
||||
},
|
||||
update_focused_file = {
|
||||
enable = false,
|
||||
update_cwd = false,
|
||||
ignore_list = {}
|
||||
},
|
||||
system_open = {
|
||||
cmd = nil,
|
||||
args = {}
|
||||
},
|
||||
filters = {
|
||||
dotfiles = false,
|
||||
custom = {}
|
||||
},
|
||||
git = {
|
||||
enable = true,
|
||||
ignore = true,
|
||||
timeout = 500,
|
||||
},
|
||||
view = {
|
||||
width = 35,
|
||||
height = 35,
|
||||
hide_root_folder = false,
|
||||
side = 'left',
|
||||
auto_resize = false,
|
||||
mappings = {
|
||||
custom_only = false,
|
||||
list = {}
|
||||
},
|
||||
number = false,
|
||||
relativenumber = false,
|
||||
signcolumn = "yes"
|
||||
},
|
||||
trash = {
|
||||
cmd = "trash",
|
||||
require_confirm = true
|
||||
},
|
||||
actions = {
|
||||
change_dir = {
|
||||
global = false,
|
||||
},
|
||||
open_file = {
|
||||
quit_on_open = false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-- local tree_cb = require'nvim-tree.config'.nvim_tree_callback
|
||||
|
||||
-- default mappings
|
||||
local list = {
|
||||
{ key = {"<CR>", "o", "<2-LeftMouse>"}, action = "edit" },
|
||||
{ key = {"O"}, action = "edit_no_picker" },
|
||||
{ key = {"<2-RightMouse>", "<C-]>"}, action = "cd" },
|
||||
{ key = "<C-v>", action = "vsplit" },
|
||||
{ key = "<C-x>", action = "split" },
|
||||
{ key = "<C-t>", action = "tabnew" },
|
||||
{ key = "<", action = "prev_sibling" },
|
||||
{ key = ">", action = "next_sibling" },
|
||||
{ key = "P", action = "parent_node" },
|
||||
{ key = "<BS>", action = "close_node" },
|
||||
{ key = "<Tab>", action = "preview" },
|
||||
{ key = "K", action = "first_sibling" },
|
||||
{ key = "J", action = "last_sibling" },
|
||||
{ key = "I", action = "toggle_ignored" },
|
||||
{ key = "H", action = "toggle_dotfiles" },
|
||||
{ key = "R", action = "refresh" },
|
||||
{ key = "a", action = "create" },
|
||||
{ key = "d", action = "remove" },
|
||||
{ key = "D", action = "trash" },
|
||||
{ key = "r", action = "rename" },
|
||||
{ key = "<C-r>", action = "full_rename" },
|
||||
{ key = "x", action = "cut" },
|
||||
{ key = "c", action = "copy" },
|
||||
{ key = "p", action = "paste" },
|
||||
{ key = "y", action = "copy_name" },
|
||||
{ key = "Y", action = "copy_path" },
|
||||
{ key = "gy", action = "copy_absolute_path" },
|
||||
{ key = "[c", action = "prev_git_item" },
|
||||
{ key = "]c", action = "next_git_item" },
|
||||
{ key = "-", action = "dir_up" },
|
||||
{ key = "s", action = "system_open" },
|
||||
{ key = "q", action = "close" },
|
||||
{ key = "g?", action = "toggle_help" },
|
||||
}
|
||||
53
nvim/plugin-confs/symbols-outline.lua
Normal file
53
nvim/plugin-confs/symbols-outline.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
-- init.lua
|
||||
vim.g.symbols_outline = {
|
||||
highlight_hovered_item = true,
|
||||
show_guides = true,
|
||||
auto_preview = true,
|
||||
position = 'right',
|
||||
relative_width = true,
|
||||
width = 35,
|
||||
auto_close = false,
|
||||
show_numbers = false,
|
||||
show_relative_numbers = false,
|
||||
show_symbol_details = true,
|
||||
preview_bg_highlight = 'Pmenu',
|
||||
keymaps = { -- These keymaps can be a string or a table for multiple keys
|
||||
close = {"<Esc>", "q"},
|
||||
goto_location = "<Cr>",
|
||||
focus_location = "o",
|
||||
hover_symbol = "<C-space>",
|
||||
toggle_preview = "K",
|
||||
rename_symbol = "r",
|
||||
code_actions = "a",
|
||||
},
|
||||
lsp_blacklist = {},
|
||||
symbol_blacklist = {},
|
||||
symbols = {
|
||||
File = {icon = "", hl = "TSURI"},
|
||||
Module = {icon = "", hl = "TSNamespace"},
|
||||
Namespace = {icon = "", hl = "TSNamespace"},
|
||||
Package = {icon = "", hl = "TSNamespace"},
|
||||
Class = {icon = "𝓒", hl = "TSType"},
|
||||
Method = {icon = "ƒ", hl = "TSMethod"},
|
||||
Property = {icon = "", hl = "TSMethod"},
|
||||
Field = {icon = "", hl = "TSField"},
|
||||
Constructor = {icon = "", hl = "TSConstructor"},
|
||||
Enum = {icon = "ℰ", hl = "TSType"},
|
||||
Interface = {icon = "ﰮ", hl = "TSType"},
|
||||
Function = {icon = "", hl = "TSFunction"},
|
||||
Variable = {icon = "", hl = "TSConstant"},
|
||||
Constant = {icon = "", hl = "TSConstant"},
|
||||
String = {icon = "𝓐", hl = "TSString"},
|
||||
Number = {icon = "#", hl = "TSNumber"},
|
||||
Boolean = {icon = "⊨", hl = "TSBoolean"},
|
||||
Array = {icon = "", hl = "TSConstant"},
|
||||
Object = {icon = "⦿", hl = "TSType"},
|
||||
Key = {icon = "🔐", hl = "TSType"},
|
||||
Null = {icon = "NULL", hl = "TSType"},
|
||||
EnumMember = {icon = "", hl = "TSField"},
|
||||
Struct = {icon = "𝓢", hl = "TSType"},
|
||||
Event = {icon = "🗲", hl = "TSType"},
|
||||
Operator = {icon = "+", hl = "TSOperator"},
|
||||
TypeParameter = {icon = "𝙏", hl = "TSParameter"}
|
||||
}
|
||||
}
|
||||
24
nvim/plugin-confs/treesitter.lua
Normal file
24
nvim/plugin-confs/treesitter.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
require'nvim-treesitter.configs'.setup {
|
||||
-- One of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
ensure_installed = "maintained",
|
||||
|
||||
-- Install languages synchronously (only applied to `ensure_installed`)
|
||||
sync_install = false,
|
||||
|
||||
-- List of parsers to ignore installing
|
||||
-- ignore_install = { "javascript" },
|
||||
|
||||
highlight = {
|
||||
-- `false` will disable the whole extension
|
||||
enable = true,
|
||||
|
||||
-- list of language that will be disabled
|
||||
-- disable = { "c", "rust" },
|
||||
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
||||
65
nvim/plugin-confs/whichkey.lua
Normal file
65
nvim/plugin-confs/whichkey.lua
Normal file
@@ -0,0 +1,65 @@
|
||||
require("which-key").setup {
|
||||
plugins = {
|
||||
marks = true, -- shows a list of your marks on ' and `
|
||||
registers = true, -- shows your registers on " in NORMAL or <C-r> in INSERT mode
|
||||
spelling = {
|
||||
enabled = false, -- enabling this will show WhichKey when pressing z= to select spelling suggestions
|
||||
suggestions = 20, -- how many suggestions should be shown in the list?
|
||||
},
|
||||
-- the presets plugin, adds help for a bunch of default keybindings in Neovim
|
||||
-- No actual key bindings are created
|
||||
presets = {
|
||||
operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion
|
||||
motions = true, -- adds help for motions
|
||||
text_objects = true, -- help for text objects triggered after entering an operator
|
||||
windows = true, -- default bindings on <c-w>
|
||||
nav = true, -- misc bindings to work with windows
|
||||
z = true, -- bindings for folds, spelling and others prefixed with z
|
||||
g = true, -- bindings for prefixed with g
|
||||
},
|
||||
},
|
||||
-- add operators that will trigger motion and text object completion
|
||||
-- to enable all native operators, set the preset / operators plugin above
|
||||
operators = { gc = "Comments" },
|
||||
key_labels = {
|
||||
-- override the label used to display some keys. It doesn't effect WK in any other way.
|
||||
-- For example:
|
||||
-- ["<space>"] = "SPC",
|
||||
-- ["<cr>"] = "RET",
|
||||
-- ["<tab>"] = "TAB",
|
||||
},
|
||||
icons = {
|
||||
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
|
||||
separator = "➜", -- symbol used between a key and it's label
|
||||
group = "+", -- symbol prepended to a group
|
||||
},
|
||||
popup_mappings = {
|
||||
scroll_down = '<c-d>', -- binding to scroll down inside the popup
|
||||
scroll_up = '<c-u>', -- binding to scroll up inside the popup
|
||||
},
|
||||
window = {
|
||||
border = "none", -- none, single, double, shadow
|
||||
position = "bottom", -- bottom, top
|
||||
margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left]
|
||||
padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left]
|
||||
winblend = 0
|
||||
},
|
||||
layout = {
|
||||
height = { min = 4, max = 25 }, -- min and max height of the columns
|
||||
width = { min = 20, max = 50 }, -- min and max width of the columns
|
||||
spacing = 3, -- spacing between columns
|
||||
align = "left", -- align columns left, center or right
|
||||
},
|
||||
ignore_missing = false, -- enable this to hide mappings for which you didn't specify a label
|
||||
hidden = { "<silent>", "<cmd>", "<Cmd>", "<CR>", "call", "lua", "^:", "^ "}, -- hide mapping boilerplate
|
||||
show_help = true, -- show help message on the command line when the popup is visible
|
||||
triggers = "auto", -- automatically setup triggers
|
||||
-- triggers = {"<leader>"} -- or specify a list manually
|
||||
triggers_blacklist = {
|
||||
-- list of mode / prefixes that should never be hooked by WhichKey
|
||||
-- this is mostly relevant for key maps that start with a native binding
|
||||
-- most people should not need to change this
|
||||
i = { "j", "k" },
|
||||
v = { "j", "k" },
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user