This commit is contained in:
ksyasuda 2022-04-29 17:09:49 -07:00
parent 9b80bee1d5
commit 8c30d6f1d6
10 changed files with 193 additions and 162 deletions

View File

@ -1,6 +1,6 @@
host = localhost host = localhost
port = 6600 port = 6600
music-dir = /home/sudacode/Music/ music-dir = /jellyfin/music
oneline = false oneline = false
scale = 600 scale = 600
timeout = 5 timeout = 5

View File

@ -38,12 +38,14 @@ set expandtab
set hidden set hidden
set nobackup set nobackup
set nowritebackup set nowritebackup
set cmdheight=2 set cmdheight=1
set updatetime=300 set updatetime=300
set timeoutlen=400 set timeoutlen=400
" Don't pass messages to |ins-completion-menu|. " Don't pass messages to |ins-completion-menu|.
set shortmess+=c set shortmess+=c
set pumwidth=35
" Install vim-plug if not found " Install vim-plug if not found
if empty(glob('~/.vim/autoload/plug.vim')) if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs

View File

@ -6,13 +6,16 @@ vnoremap < <gv
vnoremap > >gv vnoremap > >gv
" for toggling/hiding the split-term " for toggling/hiding the split-term
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatingterm<CR> tnoremap <C-T> <C-\><C-n>:FloatermToggle floatterm<CR>
tnoremap <Esc> <C-\><C-n> tnoremap <Esc> <C-\><C-n>
tnoremap <leader>tt <C-\><C-N>:FloatermToggle split-term<CR> tnoremap <leader>tt <C-\><C-N>:FloatermToggle split-term<CR>
tnoremap <leader>tf <C-\><C-N>:FloatermToggle floatterm<CR>
tnoremap <leader>tp <C-\><C-N>:FloatermToggle ipython<CR>
tnoremap <leader>tP <C-\><C-N>:FloatermToggle ipython-full<CR>
nmap <C-J> :bnext<CR> nmap <C-J> :bnext<CR>
nmap <C-K> :bprev<CR> nmap <C-K> :bprev<CR>
nmap <C-T> :wa<CR>:FloatermToggle floatingterm<CR> nmap <C-T> :wa<CR>:FloatermToggle floatterm<CR>
nmap <C-n> :NvimTreeToggle<CR> nmap <C-n> :NvimTreeToggle<CR>
" open file under cursor, create if necessary " open file under cursor, create if necessary
@ -91,8 +94,11 @@ nmap <leader>n :NvimTreeToggle<CR>
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR> nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR> nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
nmap <leader>of :wa<CR>:FloatermToggle floatterm<CR>
nmap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR> nmap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR> nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
nmap <leader>op :FloatermNew --title=ipython --name=ipython --opener=split --wintype=vsplit --position=botright --width=0.5 ipython<CR>
nmap <leader>oP :FloatermNew --title=ipython-full --name=ipython-full --opener=edit --width=1.0 --height=1.0 ipython<CR>
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR> nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
nmap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR> nmap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
@ -107,7 +113,10 @@ nmap <leader>sh :History:<CR>
nmap <leader>s/ :History/<CR> nmap <leader>s/ :History/<CR>
nnoremap <silent> <Leader>tc :DashboardChangeColorscheme<CR> nnoremap <silent> <Leader>tc :DashboardChangeColorscheme<CR>
nmap <leader>tf :wa<CR>:FloatermToggle floatterm<CR>
nmap <leader>to :SymbolsOutline<CR> nmap <leader>to :SymbolsOutline<CR>
nmap <leader>tp :FloatermToggle ipython<CR>
nmap <leader>tP :FloatermToggle ipython-full<CR>
nmap <leader>tt :FloatermToggle split-term<CR> nmap <leader>tt :FloatermToggle split-term<CR>
nmap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR> nmap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>

View File

@ -1,55 +1,55 @@
cfg = { cfg = {
debug = false, -- set to true to enable debug logging debug = false, -- set to true to enable debug logging
log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on log_path = vim.fn.stdpath("cache") .. "/lsp_signature.log", -- log dir when debug is on
-- default is ~/.cache/nvim/lsp_signature.log -- default is ~/.cache/nvim/lsp_signature.log
verbose = false, -- show debug line number verbose = false, -- show debug line number
bind = true, -- This is mandatory, otherwise border config won't get registered. 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 -- 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); 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 -- 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 -- This setting only take effect in insert mode, it does not affect signature help in normal
-- mode, 10 by default -- mode, 10 by default
floating_window = true, -- show hint in a floating window, set to false for virtual text only mode 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: 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 -- 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 -- 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_x = 1, -- adjust float windows x position.
floating_window_off_y = 1, -- adjust float windows y 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 fix_pos = false, -- set to true, the floating window will not auto-close until finish all parameters
hint_enable = true, -- virtual hint enable hint_enable = true, -- virtual hint enable
hint_prefix = "", -- Panda for parameter hint_prefix = "", -- Panda for parameter
hint_scheme = "String", hint_scheme = "String",
hi_parameter = "LspSignatureActiveParameter", -- how your parameter will be highlight 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 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 -- to view the hiding contents
max_width = 80, -- max_width of signature floating_window, line will be wrapped if exceed max_width max_width = 40, -- max_width of signature floating_window, line will be wrapped if exceed max_width
handler_opts = { handler_opts = {
border = "rounded" -- double, rounded, single, shadow, none 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 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. 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., {"(", ","} 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 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 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 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_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' 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 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>' toggle_key = nil -- toggle signature on and off in insert mode, e.g. toggle_key = '<M-x>'
} }
-- recommended: -- recommended:
require'lsp_signature'.setup(cfg) -- no need to specify bufnr if you don't use toggle_key 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 -- You can also do this inside lsp on_attach
-- note: on_attach deprecated -- note: on_attach deprecated

View File

@ -70,11 +70,21 @@ local border = {
{ "", "FloatBorder" }, { "", "FloatBorder" },
} }
local handlers = { local handlers = {
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }), ["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }),
["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }), ["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }),
} }
-- local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
-- function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
-- opts = {
-- { "border", border },
-- }
-- opts.border = opts.border or border
-- return orig_util_open_floating_preview(contents, syntax, opts, ...)
-- end
local DEFAULT_SETTINGS = { local DEFAULT_SETTINGS = {
ui = { ui = {
icons = { icons = {
@ -176,7 +186,8 @@ end)
-- Use a loop to conveniently call 'setup' on multiple servers and -- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches -- map buffer local keybindings when the language server attaches
local servers = { 'pyright', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'dotls', 'rust_analyzer', 'clangd', 'ansiblels' } -- local servers = { 'pyright', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'dotls', 'rust_analyzer', 'clangd', 'ansiblels' }
local servers = { 'jedi_language_server', 'bashls', 'vimls', 'yamlls', 'dockerls', 'html', 'sumneko_lua', 'dotls', 'rust_analyzer', 'clangd', 'ansiblels' }
for _, lsp in pairs(servers) do for _, lsp in pairs(servers) do
require('lspconfig')[lsp].setup { require('lspconfig')[lsp].setup {
on_attach = on_attach, on_attach = on_attach,

View File

@ -62,7 +62,7 @@ cmp.setup({
formatting = { formatting = {
format = lspkind.cmp_format({ format = lspkind.cmp_format({
mode = 'symbol', -- show only symbol annotations mode = 'symbol', -- show only symbol annotations
maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) maxwidth = 20, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters)
-- The function below will be called before any actual modifications from lspkind -- The function below will be called before any actual modifications from lspkind
-- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30)) -- so that you can provide more controls on popup customization. (See [#30](https://github.com/onsails/lspkind-nvim/pull/30))

View File

@ -1,106 +1,106 @@
require'nvim-tree'.setup { require 'nvim-tree'.setup {
disable_netrw = false, disable_netrw = false,
hijack_netrw = false, hijack_netrw = false,
open_on_setup = false, open_on_setup = false,
ignore_ft_on_setup = {}, ignore_ft_on_setup = {},
auto_close = false, -- auto_close = false,
open_on_tab = false, open_on_tab = false,
hijack_cursor = false, hijack_cursor = false,
update_cwd = false, update_cwd = false,
update_to_buf_dir = { -- update_to_buf_dir = {
enable = true, -- enable = true,
auto_open = true, -- auto_open = true,
}, -- },
diagnostics = { diagnostics = {
enable = true, enable = true,
icons = { icons = {
hint = "", hint = "",
info = "", info = "",
warning = "", warning = "",
error = "", 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, update_focused_file = {
relativenumber = false, enable = false,
signcolumn = "yes" update_cwd = false,
}, ignore_list = {}
trash = {
cmd = "trash",
require_confirm = true
},
actions = {
change_dir = {
global = false,
}, },
open_file = { system_open = {
quit_on_open = false, 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 -- local tree_cb = require'nvim-tree.config'.nvim_tree_callback
-- default mappings -- default mappings
local list = { local list = {
{ key = {"<CR>", "o", "<2-LeftMouse>"}, action = "edit" }, { key = { "<CR>", "o", "<2-LeftMouse>" }, action = "edit" },
{ key = {"O"}, action = "edit_no_picker" }, { key = { "O" }, action = "edit_no_picker" },
{ key = {"<2-RightMouse>", "<C-]>"}, action = "cd" }, { key = { "<2-RightMouse>", "<C-]>" }, action = "cd" },
{ key = "<C-v>", action = "vsplit" }, { key = "<C-v>", action = "vsplit" },
{ key = "<C-x>", action = "split" }, { key = "<C-x>", action = "split" },
{ key = "<C-t>", action = "tabnew" }, { key = "<C-t>", action = "tabnew" },
{ key = "<", action = "prev_sibling" }, { key = "<", action = "prev_sibling" },
{ key = ">", action = "next_sibling" }, { key = ">", action = "next_sibling" },
{ key = "P", action = "parent_node" }, { key = "P", action = "parent_node" },
{ key = "<BS>", action = "close_node" }, { key = "<BS>", action = "close_node" },
{ key = "<Tab>", action = "preview" }, { key = "<Tab>", action = "preview" },
{ key = "K", action = "first_sibling" }, { key = "K", action = "first_sibling" },
{ key = "J", action = "last_sibling" }, { key = "J", action = "last_sibling" },
{ key = "I", action = "toggle_ignored" }, { key = "I", action = "toggle_ignored" },
{ key = "H", action = "toggle_dotfiles" }, { key = "H", action = "toggle_dotfiles" },
{ key = "R", action = "refresh" }, { key = "R", action = "refresh" },
{ key = "a", action = "create" }, { key = "a", action = "create" },
{ key = "d", action = "remove" }, { key = "d", action = "remove" },
{ key = "D", action = "trash" }, { key = "D", action = "trash" },
{ key = "r", action = "rename" }, { key = "r", action = "rename" },
{ key = "<C-r>", action = "full_rename" }, { key = "<C-r>", action = "full_rename" },
{ key = "x", action = "cut" }, { key = "x", action = "cut" },
{ key = "c", action = "copy" }, { key = "c", action = "copy" },
{ key = "p", action = "paste" }, { key = "p", action = "paste" },
{ key = "y", action = "copy_name" }, { key = "y", action = "copy_name" },
{ key = "Y", action = "copy_path" }, { key = "Y", action = "copy_path" },
{ key = "gy", action = "copy_absolute_path" }, { key = "gy", action = "copy_absolute_path" },
{ key = "[c", action = "prev_git_item" }, { key = "[c", action = "prev_git_item" },
{ key = "]c", action = "next_git_item" }, { key = "]c", action = "next_git_item" },
{ key = "-", action = "dir_up" }, { key = "-", action = "dir_up" },
{ key = "s", action = "system_open" }, { key = "s", action = "system_open" },
{ key = "q", action = "close" }, { key = "q", action = "close" },
{ key = "g?", action = "toggle_help" }, { key = "g?", action = "toggle_help" },
} }

View File

@ -1,24 +1,34 @@
require'nvim-treesitter.configs'.setup { require 'nvim-treesitter.configs'.setup {
-- One of "all", "maintained" (parsers with maintainers), or a list of languages -- One of "all", "maintained" (parsers with maintainers), or a list of languages
ensure_installed = "maintained", -- ensure_installed = "maintained",
-- Install languages synchronously (only applied to `ensure_installed`) -- Install languages synchronously (only applied to `ensure_installed`)
sync_install = false, sync_install = false,
-- List of parsers to ignore installing -- List of parsers to ignore installing
-- ignore_install = { "javascript" }, -- ignore_install = { "javascript" },
highlight = { highlight = {
-- `false` will disable the whole extension -- `false` will disable the whole extension
enable = true, enable = true,
-- list of language that will be disabled -- list of language that will be disabled
-- disable = { "c", "rust" }, -- disable = { "c", "rust" },
-- Setting this to true will run `:h syntax` and tree-sitter at the same time. -- 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). -- 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. -- 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 -- Instead of true it can also be a list of languages
additional_vim_regex_highlighting = false, additional_vim_regex_highlighting = false,
}, },
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
} }

View File

@ -51,7 +51,6 @@ nmap <leader>n :NvimTreeToggle<CR>
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR> nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR> nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR> nmap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
nmap <leader>oo :OverCommandLine<CR>
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR> nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
" nmap <leader>ot :vertical botright ter ++kill=terminal ++close<CR> " nmap <leader>ot :vertical botright ter ++kill=terminal ++close<CR>
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR> nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR>

View File

@ -11,8 +11,8 @@ let g:fzf_tags_command = 'ctags -R'
" - CTRL-/ will toggle preview window. " - CTRL-/ will toggle preview window.
" - Note that this array is passed as arguments to fzf#vim#with_preview function. " - Note that this array is passed as arguments to fzf#vim#with_preview function.
" - To learn more about preview window options, see `--preview-window` section of `man fzf`. " - To learn more about preview window options, see `--preview-window` section of `man fzf`.
let g:fzf_preview_window = ['right:50%', 'ctrl-/'] let g:fzf_preview_window = ['right:45%', 'ctrl-/']
let g:fzf_layout = { 'window': { 'width': 0.8, 'height': 0.75 } } let g:fzf_layout = { 'window': { 'width': 0.95, 'height': 0.85 } }
let g:fzf_action = { let g:fzf_action = {
\ 'ctrl-t': 'tab split', \ 'ctrl-t': 'tab split',