initial commit

This commit is contained in:
ksyasuda 2022-11-02 22:50:13 -07:00
commit 1ede5f5311
40 changed files with 2125 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
plugin
spell
.git
*.old

10
autocommands.vim Normal file
View File

@ -0,0 +1,10 @@
" open at last location if possible
if has('autocmd')
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" open help and man pages in a vertical split
autocmd FileType help wincmd L
autocmd FileType man wincmd L
" make terminal not have line numbers
autocmd TermOpen * setlocal nonumber norelativenumber

50
coc-settings.json Normal file
View File

@ -0,0 +1,50 @@
{
"diagnostic.displayByAle": false,
"diagnostic.enable": true,
"diagnostic.level": "hint",
"diagnostic-languageserver.enable": true,
"diagnostic-languageserver.filetypes": {
"sh": "shellcheck",
"python": "pylint"
},
"diagnostic-languageserver.mergeConfig": true,
"diagnostic-languageserver.formatFiletypes": {
"sh": "shfmt",
"python": ["black", "isort"]
},
"diagnostic-languageserver.formatters": {
"shfmt": {
"command": "shfmt",
"args": ["-i", "4", "-ci", "-sr"]
},
"black": {
"command": "black"
}
},
"pyright.organizeimports.provider": "isort",
"pyright.completion.importSupport": true,
"pyright.enable": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "/usr/bin/pylint",
"python.formatting.blackPath": "/usr/bin/black",
"python.analysis.autoSearchPaths": true,
"python.venvPath": "env",
"languageserver": {
"python": {
"command": "pyright",
"filetypes": ["python", "py"]
}
},
"hover.floatConfig": {
"border": true,
"shadow": true,
"focusable": true,
"highlight": "CocFloating",
"borderhighlight": "CocFloating"
},
"diagnostic.virtualText": true,
"diagnostic.virtualTextLines": 5,
"diagnostic.virtualTextLevel": "information",
"codeLens.enable": true,
"codeLens.position": "eol"
}

98
init.vim Normal file
View File

@ -0,0 +1,98 @@
if has('autocmd')
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
" open help and man pages in a vertical split
autocmd FileType help wincmd L
autocmd FileType man wincmd L
" make terminal not have line numbers
autocmd TermOpen * setlocal nonumber norelativenumber
" " " gray
" highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080
" " blue
" highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6
" highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch
" " light blue
" highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE
" highlight! link CmpItemKindInterface CmpItemKindVariable
" highlight! link CmpItemKindText CmpItemKindVariable
" " pink
" highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0
" highlight! link CmpItemKindMethod CmpItemKindFunction
" " front
" highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4
" highlight! link CmpItemKindProperty CmpItemKindKeyword
" highlight! link CmpItemKindUnit CmpItemKindKeyword
" highlight! PmenuSel guibg=#51afef guifg=NONE
" highlight! Pmenu guifg=#C5CDD9 guibg=#51afef
lua require('settings')
lua require('plugins')
source ~/.config/nvim/keybindings.vim
" nvim plugins
source ~/.config/nvim/plugin-confs/bufferline.lua
" source ~/.config/nvim/plugin-confs/dashboard-art.vim
source ~/.config/nvim/plugin-confs/dashboard-nvim.lua
source ~/.config/nvim/plugin-confs/gitsigns.lua
source ~/.config/nvim/plugin-confs/lspfuzzy.lua
source ~/.config/nvim/plugin-confs/lualine.lua
source ~/.config/nvim/plugin-confs/nvimtree.lua
source ~/.config/nvim/plugin-confs/presence.lua
source ~/.config/nvim/plugin-confs/treesitter.lua
source ~/.config/nvim/plugin-confs/whichkey.lua
source ~/.config/nvim/plugin-confs/telescope.lua
source ~/.config/nvim/plugin-confs/code_actions.lua
source ~/.config/nvim/plugin-confs/goto-preview.lua
source ~/.config/nvim/plugin-confs/lsp-kind.lua
source ~/.config/nvim/plugin-confs/lspconfig.lua
source ~/.config/nvim/plugin-confs/lsplines.lua
source ~/.config/nvim/plugin-confs/null-ls.lua
source ~/.config/nvim/plugin-confs/nvim-cmp.lua
source ~/.config/nvim/plugin-confs/fidget.lua
source ~/.config/nvim/plugin-confs/symbols-outline.lua
" source ~/.config/nvim/plugin-confs/copilot.lua
" source ~/.config/nvim/plugin-confs/lsp-signature.lua
" source ~/.config/nvim/plugin-confs/nvim-docs-view.lua
" nvim and vim plugins
source ~/.vim/plugin-confs/floaterm.vim
source ~/.vim/plugin-confs/fzf.vim
source ~/.vim/plugin-confs/vim-closetag.vim
source ~/.vim/plugin-confs/wakatime.vim
source ~/.config/nvim/plugin-confs/doomone.lua
source ~/.config/nvim/plugin-confs/dracula.lua
source ~/.config/nvim/plugin-confs/github-theme.lua
source ~/.config/nvim/plugin-confs/onedarkpro.lua
source ~/.config/nvim/lua/toggle_lsp_diagnostics.lua
" CUSTOM COMMANDS
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
command! -bang -nargs=? -complete=dir AllFiles
\ call fzf#run(fzf#wrap('allfiles', fzf#vim#with_preview({'dir': <q-args>, 'sink': 'e', 'source': 'rg --files --hidden --no-ignore', 'options': ['--layout=reverse', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0))
command! -bang -nargs=? -complete=dir Lines
\ call fzf#vim#lines(<q-args>, ({'options': ['--layout=reverse']}), <bang>0)
command! -bang -nargs=? -complete=dir Buffers
\ call fzf#vim#buffers(<q-args>, fzf#vim#with_preview({'options': ['--layout=reverse', '--info=inline', '--preview', '~/.vim/plugged/fzf.vim/bin/preview.sh']}), <bang>0)
command! Reload execute "source ~/.config/nvim/init.vim"
command! Config execute ":e ~/.config/nvim/init.vim"
command! Plugins execute ":e ~/.config/nvim/lua/plugins.lua"
command! Settings execute ":e ~/.config/nvim/lua/settings.lua"
command! Env execute ":Dotenv .env"
command! MakeTags !ctags -R .
command! Ovewrite execute ":w !sudo tee %"
command! Aniwrapper execute ":FloatermNew aniwrapper -qtdoomone -D 144"
set termguicolors
" colorscheme doom-one
colorscheme onedarkpro
" colorscheme github_dark

140
keybindings.vim Normal file
View File

@ -0,0 +1,140 @@
nmap <F4> :set paste!<Bar>set paste?<CR>
nmap <F5> :!
" reselect visual selection after indent
vnoremap < <gv
vnoremap > >gv
" for toggling/hiding the split-term
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatterm<CR>
tnoremap <Esc> <C-\><C-n>
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-K> :bprev<CR>
nmap <C-T> :wa<CR>:FloatermToggle floatterm<CR>
" open file under cursor, create if necessary
nnoremap // :Telescope current_buffer_fuzzy_find<CR>
nnoremap ?? :BLines<CR>
nmap gA :lua vim.lsp.buf.code_actions()<CR>
nmap gd :Telescope lsp_definitions<CR>
nmap gDc :Telescope lsp_implementations<CR>
nmap gDf :Telescope lsp_definitions<CR>
nmap gF :edit <cfile><cr>
nmap gT :Telescope lsp_type_definitions<CR>
nmap gb :Gitsigns blame_line<CR>
" nmap gd :lua vim.lsp.buf.definition()<CR>
nmap gi :Telescope lsp_implementations<CR>
nmap gj :Telescope jumplist<CR>
nmap gl :lua vim.lsp.buf.code_lens()<CR>
nmap gr :Telescope lsp_references<CR>
nmap gs :lua vim.lsp.buf.signature_help()<CR>
nmap Q !!$SHELL<CR>
nmap rn :lua vim.lsp.buf.rename()<CR>
nmap <leader>as :FloatermNew --title=aniwrapper aniwrapper -qtdoomone -D144<CR>
nmap <leader>ad :FloatermNew --title=aniwrapper ani-cli -q720p -cd/home/sudacode/Videos/sauce -D144<CR>
nmap <leader>bb :Telescope buffers<CR>
nmap <leader>bk :bdelete<CR>
nmap <leader>bn :bnext<CR>
nmap <leader>bp :bprev<CR>
nmap <leader>ca :lua vim.lsp.buf.code_action()<CR>
nmap <leader>cc :vert Copilot<CR>
nmap <leader>cd :Telescope diagnostics<CR>
" nmap <leader>cl :lua vim.lsp.diagnostic.show_line_diagnostics()<CR>
nnoremap <silent> <Leader>cn :DashboardNewFile<CR>
nnoremap <leader>ff :Telescope find_files<cr>
nnoremap <leader>fg :Telescope live_grep<cr>
nnoremap <leader>fb :Telescope buffers<cr>
nnoremap <leader>fh :Telescope help_tags<cr>
nmap <silent> <Leader>fa :DashboardFindWord<CR>
nmap <silent> <Leader>fb :DashboardJumpMark<CR>
nmap <silent> <Leader>fh :DashboardFindHistory<CR>
nmap <leader>gb :Gitsigns blame_line<CR>
nmap <leader>gc :Telescope git_commits<CR>
nmap <leader>gf :Telescope git_files<CR>
" nmap <leader>gg :Neogit<CR>
nmap <leader>gg :FloatermNew --title=lazygit --width=1.0 --height=1.0 --opener=vsplit lazygit<CR>
nnoremap gP <cmd>lua require('goto-preview').close_all_win()<CR>
nnoremap gR <cmd>Telescope lsp_references<cr>
nnoremap gpc <cmd>lua require('goto-preview').close_all_win()<CR>
nnoremap gpd <cmd>lua require('goto-preview').goto_preview_definition()<CR>
nnoremap gpi <cmd>lua require('goto-preview').goto_preview_implementation()<CR>
nmap <leader>hc :Telescope commands<CR>
nmap <leader>hh :Telescope tags<CR>
nmap <leader>hk :Telescope keymaps<CR>
nmap <leader>hs :Telescope spell_suggest<CR>
nmap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
nmap <leader>j :AnyJump<CR>
" nmap K :DocsViewToggle<CR>
nmap K :lua vim.lsp.buf.hover()<CR>
nmap <leader>ld :Telescope lsp_definitions<CR>
nmap <leader>la :lua vim.lsp.buf.code_action()<CR>
nmap <leader>lci :Telescope lsp_incoming_calls<CR>
nmap <leader>lco :Telescope lsp_outgoing_calls<CR>
nmap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
nmap <leader>li :Telescope lsp_implementations<CR>
nmap <leader>lr :Telescope lsp_references<CR>
nmap <leader>lR :lua vim.lsp.buf.rename()<CR>
nmap <leader>ls :Telescope lsp_document_symbols<CR>
nmap <leader>lt :Telescope lsp_type_definitions<CR>
nmap <leader>lw :Telescope lsp_dynamic_workspace_symbols<CR>
nmap <leader>n :NvimTreeToggle<CR>
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<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>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>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
nmap <leader>r :NvimTreeRefresh<CR>
nmap <Leader>sl :<C-u>SessionLoad<CR>
nmap <Leader>ss :<C-u>SessionSave<CR>
nmap <leader>sc :nohls<Cr>
nmap <leader>sC :Telescope commands<Cr>
nmap <leader>sf :Telescope find_files<Cr>
nmap <leader>sh :Telescope command_history<CR>
nmap <leader>sm :Telescope man_pages<CR>
nmap <leader>s/ :Telescope search_history<CR>
nnoremap <silent> <Leader>tc :Telescope colorscheme<CR>
nmap <leader>tf :wa<CR>:FloatermToggle floatterm<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>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
nmap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
nmap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
" nnoremap <leader>xd <cmd>TroubleToggle document_diagnostics<cr>
" nnoremap <leader>xl <cmd>TroubleToggle loclist<cr>
" nnoremap <leader>xq <cmd>TroubleToggle quickfix<cr>
" nnoremap <leader>xw <cmd>TroubleToggle workspace_diagnostics<cr>
" nnoremap <leader>xx <cmd>TroubleToggle<cr>
nmap <leader>y "+
vmap <leader>y "+

3
lua/keybindings.lua Normal file
View File

@ -0,0 +1,3 @@
local function map(m, k, v)
vim.keymap.set(m, k, v, {silent = true, noremap = true})
end

207
lua/plugins.lua Normal file
View File

@ -0,0 +1,207 @@
vim.cmd [[packadd packer.nvim]]
require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'nvim-lua/plenary.nvim'
use {
'nvim-treesitter/nvim-treesitter',
run = function() require('nvim-treesitter.install').update({ with_sync = true }) end,
}
use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
use {
"zbirenbaum/copilot.lua",
after = "lualine.nvim",
config = function ()
vim.defer_fn(function()
require('copilot').setup({
panel = {
enabled = true,
auto_refresh = false,
keymap = {
jump_prev = "[[",
jump_next = "]]",
accept = "<CR>",
refresh = "gr",
open = "<M-CR>"
},
},
suggestion = {
enabled = true,
auto_trigger = true,
debounce = 75,
keymap = {
accept = "<Tab>",
next = "<M-]>",
prev = "<M-[>",
dismiss = "<C-]>",
},
},
-- filetypes = {
-- yaml = false,
-- markdown = false,
-- help = false,
-- gitcommit = false,
-- gitrebase = false,
-- hgcommit = false,
-- svn = false,
-- cvs = false,
-- ["."] = false,
-- },
copilot_node_command = 'node', -- Node version must be < 18
plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer",
server_opts_overrides = {},
})
end, 100)
end,
}
use {
"zbirenbaum/copilot-cmp",
after = { "copilot.lua" },
config = function ()
require("copilot_cmp").setup({
-- method = "getCompletionsCycling",
-- formatters = {
-- insert_text = require("copilot_cmp.format").remove_existing
-- }
})
end
}
use {
'junegunn/fzf',
run = function() vim.fn['fzf#install']() end
}
use {
"lewis6991/hover.nvim",
config = function()
require("hover").setup {
init = function()
-- Require providers
require("hover.providers.lsp")
-- require('hover.providers.gh')
-- require('hover.providers.jira')
require('hover.providers.man')
require('hover.providers.dictionary')
end,
preview_opts = {
border = "rounded"
-- border = {
-- { "╭", "FloatBorder" },
-- { "─", "FloatBorder" },
-- { "╮", "FloatBorder" },
-- { "│", "FloatBorder" },
-- { "╯", "FloatBorder" },
-- { "─", "FloatBorder" },
-- { "╰", "FloatBorder" },
-- { "│", "FloatBorder" },
-- }
},
-- Whether the contents of a currently open hover window should be moved
-- to a :h preview-window when pressing the hover keymap.
preview_window = false,
title = true
}
-- Setup keymaps
vim.keymap.set("n", "K", require("hover").hover, {desc = "hover.nvim"})
vim.keymap.set("n", "gK", require("hover").hover_select, {desc = "hover.nvim (select)"})
end
}
use 'ap/vim-css-color'
use 'jiangmiao/auto-pairs'
use 'junegunn/fzf.vim'
use 'pechorin/any-jump.vim'
use 'tpope/vim-commentary'
use 'tpope/vim-surround'
use 'voldikss/vim-floaterm'
use 'wakatime/vim-wakatime'
use {
'akinsho/nvim-bufferline.lua'
}
use {
'andweeb/presence.nvim'
}
use {
'folke/which-key.nvim'
}
use {
'glepnir/dashboard-nvim'
}
use {
'kyazdani42/nvim-tree.lua'
}
use 'kyazdani42/nvim-web-devicons'
use {
'lewis6991/gitsigns.nvim'
}
use {
'nvim-telescope/telescope.nvim'
}
use {
'ojroques/nvim-lspfuzzy'
}
use 'L3MON4D3/LuaSnip'
-- use 'amrbashir/nvim-docs-view'
use {
'hrsh7th/nvim-cmp'
}
use {
'hrsh7th/cmp-nvim-lsp'
}
use {
'hrsh7th/cmp-nvim-lua'
}
use {
'hrsh7th/cmp-nvim-lsp-signature-help'
}
use {
'hrsh7th/cmp-path'
}
use {
'hrsh7th/cmp-buffer'
}
use {
'j-hui/fidget.nvim'
}
use {
'jose-elias-alvarez/null-ls.nvim'
}
use {
'ksyasuda/lsp_lines.nvim'
}
use {
'neovim/nvim-lspconfig'
}
use {
'onsails/lspkind-nvim'
}
-- use 'ray-x/lsp_signature.nvim'
use {
'rmagatti/goto-preview'
}
use 'saadparwaiz1/cmp_luasnip'
use 'williamboman/nvim-lsp-installer'
use {
'Mofiqul/dracula.nvim'
}
use {
'NTBBloodbath/doom-one.nvim'
}
use {
'olimorris/onedarkpro.nvim'
}
use {
'projekt0n/github-nvim-theme'
}
end)

43
lua/settings.lua Normal file
View File

@ -0,0 +1,43 @@
local g = vim.g
local o = vim.o
local A = vim.api
g.mapleader = " "
g.maplocalleader = ','
g.fzf_command = 'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"'
o.completeopt="menu,menuone,noselect"
o.showmode = false
o.termguicolors = true
o.background = 'dark'
o.mouse = 'a'
o.syntax = 'on'
o.laststatus = 3
o.number = true
o.relativenumber = true
o.colorcolumn = '80'
o.textwidth = 80
o.shiftwidth = 4
o.tabstop = 4
o.autoindent = true
o.ignorecase = true
o.smartcase = true
o.incsearch = true
o.hlsearch = true
o.title = true
o.splitright = true
o.cursorline = true
o.scrolloff = 8
o.sidescrolloff = 8
o.wildmenu = true
o.wildignore= '.git,.hg,.svn,CVS,.DS_Store,.idea,.vscode,.vscode-test,node_modules'
o.showmatch = true
o.list = true
o.listchars = 'tab:»·,trail:·,nbsp:·,extends:>,precedes:<'
o.encoding = 'utf-8'
o.guifont = 'JetBrainsMono Nerd Font 14'
o.expandtab = true
o.hidden = true
o.cmdheight = 1
o.updatetime = 300
o.timeoutlen = 500
o.pumwidth=35

View File

@ -0,0 +1,11 @@
local diagnostics_active = true
local toggle_diagnostics = function()
diagnostics_active = not diagnostics_active
if diagnostics_active then
vim.diagnostic.show()
else
vim.diagnostic.hide()
end
end
vim.keymap.set('n', '<leader>td', toggle_diagnostics)

View 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_style = '',
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 = "nvim_lsp",
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',
}
}

View File

@ -0,0 +1,14 @@
local M = {}
local lsp_util = vim.lsp.util
function M.code_action_listener()
local context = { diagnostics = vim.lsp.diagnostic.get_line_diagnostics() }
local params = lsp_util.make_range_params()
params.context = context
vim.lsp.buf_request(0, 'textDocument/codeAction', params, function(err, _, result)
-- do something with result - e.g. check if empty and show some indication such as a sign
end)
end
return M

38
plugin-confs/copilot.lua Normal file
View File

@ -0,0 +1,38 @@
require('copilot').setup({
panel = {
enabled = true,
auto_refresh = false,
keymap = {
jump_prev = "[[",
jump_next = "]]",
accept = "<CR>",
refresh = "gr",
open = "<S-CR>"
},
},
suggestion = {
enabled = true,
auto_trigger = false,
debounce = 75,
keymap = {
accept = "<M-l>",
next = "<M-]>",
prev = "<M-[>",
dismiss = "<C-]>",
},
},
filetypes = {
yaml = false,
markdown = false,
help = false,
gitcommit = false,
gitrebase = false,
hgcommit = false,
svn = false,
cvs = false,
["."] = false,
},
copilot_node_command = 'node', -- Node version must be < 18
plugin_manager_path = vim.fn.stdpath("data") .. "/site/pack/packer",
server_opts_overrides = {},
})

View File

@ -0,0 +1,8 @@
let g:dashboard_custom_header = [
\ ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗',
\ ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║',
\ ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║',
\ ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║',
\ ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║',
\ ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝',
\]

View File

@ -0,0 +1,36 @@
local home = os.getenv('HOME')
local db = require('dashboard')
-- macos
-- db.preview_command = 'cat | lolcat -F 0.3'
-- linux
-- db.preview_command = 'ueberzug'
-- db.preview_file_path = home .. '/.config/nvim/static/neovim.cat'
-- db.preview_file_height = 11
-- db.preview_file_width = 70
vim.cmd('source $HOME/.config/nvim/static/nvim-dashboard.vim')
db.custom_center = {
{icon = '',
desc = 'Recently latest session ',
shortcut = 'SPC s l',
action ='SessionLoad'},
{icon = '',
desc = 'Recently opened files ',
action = 'DashboardFindHistory',
shortcut = 'SPC f h'},
{icon = '',
desc = 'Find File ',
action = 'Telescope find_files find_command=rg,--hidden,--files',
shortcut = 'SPC f f'},
{icon = '',
desc ='File Browser ',
action = 'NvimTreeToggle',
shortcut = 'SPC f b'},
{icon = '',
desc = 'Find word ',
action = 'Telescope live_grep',
shortcut = 'SPC f w'},
{icon = '',
desc = 'Open Personal dotfiles ',
action = ':e ~/.config/nvim/init.vim',
shortcut = 'SPC f d'},
}

57
plugin-confs/doomone.lua Normal file
View File

@ -0,0 +1,57 @@
-- 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,
-- },
-- })
vim.g.doom_one_cursor_coloring = true
-- Set :terminal colors
vim.g.doom_one_terminal_colors = true
-- Enable italic comments
vim.g.doom_one_italic_comments = false
-- Enable TS support
vim.g.doom_one_enable_treesitter = true
-- Color whole diagnostic text or only underline
vim.g.doom_one_diagnostics_text_color = true
-- Enable transparent background
vim.g.doom_one_transparent_background = false
-- Pumblend transparency
vim.g.doom_one_pumblend_enable = false
vim.g.doom_one_pumblend_transparency = 20
-- Plugins integration
vim.g.doom_one_plugin_neorg = true
vim.g.doom_one_plugin_barbar = false
vim.g.doom_one_plugin_telescope = false
vim.g.doom_one_plugin_neogit = true
vim.g.doom_one_plugin_nvim_tree = true
vim.g.doom_one_plugin_dashboard = true
vim.g.doom_one_plugin_startify = true
vim.g.doom_one_plugin_whichkey = true
vim.g.doom_one_plugin_indent_blankline = true
vim.g.doom_one_plugin_vim_illuminate = true
vim.g.doom_one_plugin_lspsaga = false

33
plugin-confs/dracula.lua Normal file
View 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

49
plugin-confs/fidget.lua Normal file
View File

@ -0,0 +1,49 @@
require"fidget".setup {
text = {
spinner = "pipe", -- animation shown when tasks are ongoing
done = "", -- character shown when all tasks are complete
commenced = "Started", -- message shown when task starts
completed = "Completed", -- message shown when task completes
},
align = {
bottom = true, -- align fidgets along bottom edge of buffer
right = true, -- align fidgets along right edge of buffer
},
timer = {
spinner_rate = 125, -- frame rate of spinner animation, in ms
fidget_decay = 2000, -- how long to keep around empty fidget, in ms
task_decay = 1000, -- how long to keep around completed task, in ms
},
window = {
relative = "win", -- where to anchor, either "win" or "editor"
blend = 100, -- &winblend for the window
zindex = nil, -- the zindex value for the window
},
fmt = {
leftpad = true, -- right-justify text in fidget box
stack_upwards = true, -- list of tasks grows upwards
max_width = 0, -- maximum width of the fidget box
fidget = -- function to format fidget title
function(fidget_name, spinner)
return string.format("%s %s", spinner, fidget_name)
end,
task = -- function to format each task line
function(task_name, message, percentage)
return string.format(
"%s%s [%s]",
message,
percentage and string.format(" (%s%%)", percentage) or "",
task_name
)
end,
},
-- sources = {
-- * = {
-- ignore = false,
-- },
-- },
-- debug = {
-- logging = false, -- whether to enable logging, for debugging
-- strict = false, -- whether to interpret LSP strictly
-- },
}

View File

@ -0,0 +1,2 @@
vim.g.gitblame_highlight_group = "Question"
vim.g.gitblame_enabled = 0

View 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
})

43
plugin-confs/gitsigns.lua Normal file
View File

@ -0,0 +1,43 @@
require('gitsigns').setup {
signs = {
add = {hl = 'GitSignsAdd' , text = '', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '_', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
changedelete = {hl = 'GitSignsChange', text = '~', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
},
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
watch_gitdir = {
interval = 1000,
follow_files = true
},
attach_to_untracked = true,
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
current_line_blame_opts = {
virt_text = true,
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
delay = 1000,
ignore_whitespace = false,
},
current_line_blame_formatter_opts = {
relative_time = false
},
sign_priority = 6,
update_debounce = 100,
status_formatter = nil, -- Use default
max_file_length = 40000,
preview_config = {
-- Options passed to nvim_open_win
border = 'single',
style = 'minimal',
relative = 'cursor',
row = 0,
col = 1
},
yadm = {
enable = false
},
}

View File

@ -0,0 +1,19 @@
require('goto-preview').setup {
width = 120; -- Width of the floating window
height = 20; -- Height of the floating window
border = {"", "" ,"", "", "", "", "", ""}; -- Border characters of the floating window
-- border = {"┌", "─" ,"┐", "│", "┘", "─", "└", "│"}; -- Border characters of the floating window
default_mappings = false; -- Bind default mappings
debug = false; -- Print debug information
opacity = 25; -- 0-100 opacity level of the floating window where 100 is fully transparent.
resizing_mappings = false; -- Binds arrow keys to resizing the floating window.
post_open_hook = nil; -- A function taking two arguments, a buffer and a window to be ran as a hook.
references = { -- Configure the telescope UI for slowing the references cycling window.
-- telescope = telescope.themes.get_dropdown({ hide_preview = false })
};
-- These two configs can also be passed down to the goto-preview definition and implementation calls for one off "peak" functionality.
focus_on_open = true; -- Focus the floating window when opening it.
dismiss_on_move = false; -- Dismiss the floating window when moving the cursor.
force_close = false, -- passed into vim.api.nvim_win_close's second argument. See :h nvim_win_close
bufhidden = "wipe", -- the bufhidden option to set on the floating window. See :h bufhidden
}

View File

@ -0,0 +1,8 @@
-- lspkind.lua
local lspkind = require("lspkind")
lspkind.init({
symbol_map = {
Copilot = ""
},
})
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"})

View File

@ -0,0 +1,54 @@
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 = 12, -- 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 = 15, -- max height of signature floating_window, if content is more than max_height, you can scroll down
-- to view the hiding contents
max_width = 85, -- 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

217
plugin-confs/lspconfig.lua Normal file
View File

@ -0,0 +1,217 @@
local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
-- set in ~/.config/nvim/keybindings.vim
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-s>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
-- vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
-- highlighting things under cursor
-- if client.resolved_capabilities.document_highlight then
-- vim.cmd [[
-- hi! LspReferenceRead cterm=bold ctermbg=red guibg=LightYellow
-- hi! LspReferenceText cterm=bold ctermbg=red guibg=LightYellow
-- hi! LspReferenceWrite cterm=bold ctermbg=red guibg=LightYellow
-- augroup lsp_document_highlight
-- autocmd! * <buffer>
-- autocmd! CursorHold <buffer> lua vim.lsp.buf.document_highlight()
-- autocmd! CursorMoved <buffer> lua vim.lsp.buf.clear_references()
-- augroup END
-- ]]
-- end
end
vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=#1f2335]]
vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=white guibg=#1f2335]]
-- squared corners
-- local border = {
-- {"┌", "FloatBorder"},
-- {"─", "FloatBorder"},
-- {"┐", "FloatBorder"},
-- {"|", "FloatBorder"},
-- {"┘", "FloatBorder"},
-- {"─", "FloatBorder"},
-- {"└", "FloatBorder"},
-- {"|", "FloatBorder"},
-- }
-- rounded
local border = {
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
}
local handlers = {
["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { 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 = {
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 = "/home/sudacode/.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 = {},
},
on_attach = on_attach,
handlers = handlers,
-- 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,
}
vim.diagnostic.config({
virtual_text = true,
signs = true,
underline = false,
update_in_insert = false,
severity_sort = true,
})
local signs = { Error = "", Warn = "", Hint = "", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end
function PrintDiagnostics(opts, bufnr, line_nr, client_id)
bufnr = bufnr or 0
line_nr = line_nr or (vim.api.nvim_win_get_cursor(0)[1] - 1)
opts = opts or { ['lnum'] = line_nr }
local line_diagnostics = vim.diagnostic.get(bufnr, opts)
if vim.tbl_isempty(line_diagnostics) then return end
local diagnostic_message = ""
for i, diagnostic in ipairs(line_diagnostics) do
diagnostic_message = diagnostic_message .. string.format("%d: %s", i, diagnostic.message or "")
print(diagnostic_message)
if i ~= #line_diagnostics then
diagnostic_message = diagnostic_message .. "\n"
end
end
vim.api.nvim_echo({ { diagnostic_message, "Normal" } }, false, {})
end
-- vim.cmd [[ autocmd! CursorHold * lua PrintDiagnostics() ]]
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)
-- local servers = { 'jedi_language_server', 'bashls', 'vimls', 'yamlls', 'dockerls', 'rust_analyzer', 'clangd', 'ansiblels' }
-- for _, lsp in pairs(servers) do
-- require('lspconfig')[lsp].setup {
-- on_attach = on_attach,
-- handlers = handlers,
-- flags = {
-- -- This will be the default in neovim 0.7+
-- debounce_text_changes = 150,
-- }
-- }
-- end
-- local plugins_path = vim.fn.stdpath("data") .. "site/autoload/plug.vim"
-- local dir_list = vim.fn.glob(plugins_path .. "/*", true, true)
-- local library_table = {}
-- for _, v in ipairs(dir_list) do
-- library_table[v .. "/lua"] = true
-- end
-- library_table[vim.fn.expand("$VIMRUNTIME/lua")] = true
-- library_table[vim.fn.stdpath("config") .. "/lua"] = true
-- require('lspconfig').sumneko_lua.setup({
-- settings = {
-- Lua = {
-- diagnostics = { globals = { "vim" } },
-- workspace = { library = library_table },
-- },
-- },
-- })
-- -- require 'lspconfig'.bashls.setup {}

16
plugin-confs/lspfuzzy.lua Normal file
View File

@ -0,0 +1,16 @@
require('lspfuzzy').setup {
methods = 'all', -- either 'all' or a list of LSP methods (see below)
jump_one = true, -- jump immediately if there is only one location
save_last = false, -- save last location results for the :LspFuzzyLast command
callback = nil, -- callback called after jumping to a location
fzf_preview = { -- arguments to the FZF '--preview-window' option
'right:+{2}-/2' -- preview on the right and centered on entry
},
fzf_action = { -- FZF actions
['ctrl-t'] = 'tab split', -- go to location in a new tab
['ctrl-v'] = 'vsplit', -- go to location in a vertical split
['ctrl-x'] = 'split', -- go to location in a horizontal split
},
fzf_modifier = ':~:.', -- format FZF entries, see |filename-modifiers|
fzf_trim = false, -- trim FZF entries
}

View File

@ -0,0 +1,5 @@
require("lsp_lines").setup()
-- Disable virtual_text since it's redundant due to lsp_lines.
vim.diagnostic.config({
virtual_text = false,
})

52
plugin-confs/lualine.lua Normal file
View File

@ -0,0 +1,52 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'codedark',
-- theme = 'dracula',
-- theme = 'horizon',
-- theme = 'onedark',
component_separators = { left = '', right = '' },
section_separators = { left = '', right = ''},
disabled_filetypes = {},
always_divide_middle = true,
},
sections = {
lualine_a = { 'mode' },
lualine_b = { 'branch', 'diff' },
lualine_c = { 'filename' },
lualine_x = {
{
'diagnostics',
'fileformat',
symbols = {
unix = '', -- e712
dos = '', -- e70f
mac = '', -- e711
}
}, 'encoding', 'fileformat', { 'filetype', colored = true, icon_only = false } },
lualine_y = { 'progress' },
lualine_z = { 'location' }
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {
{
'filename',
file_status = true, -- Displays file status (readonly status, modified status)
path = 0, -- 0: Just the filename
shorting_target = 40, -- Shortens path to leave 40 spaces in the window
symbols = {
modified = '[+]', -- Text to show when the file is modified.
readonly = '[-]', -- Text to show when the file is non-modifiable or readonly.
unnamed = '[No Name]', -- Text to show for unnamed buffers.
}
},
},
lualine_x = { 'location' },
lualine_y = {},
lualine_z = {}
},
tabline = {},
extensions = { 'quickfix', 'fzf', 'nvim-tree', 'symbols-outline', 'fugitive' }
}

73
plugin-confs/neogit.lua Normal file
View 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"] = "",
}
}
}

121
plugin-confs/null-ls.lua Normal file
View File

@ -0,0 +1,121 @@
local null_ls = require("null-ls")
local helpers = require("null-ls.helpers")
require("null-ls").setup({
on_attach = function(client)
if client.supports_method "textDocument/formatting" then
vim.cmd([[
augroup LspFormatting
autocmd! * <buffer>
autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()
augroup END
]])
end
end,
sources = {
null_ls.builtins.completion.spell,
null_ls.builtins.completion.luasnip,
null_ls.builtins.code_actions.gitsigns,
null_ls.builtins.code_actions.shellcheck,
null_ls.builtins.diagnostics.cppcheck,
null_ls.builtins.diagnostics.gitlint,
null_ls.builtins.diagnostics.jsonlint,
-- require("null-ls").builtins.diagnostics.luacheck,
null_ls.builtins.diagnostics.markdownlint,
null_ls.builtins.diagnostics.pylint,
null_ls.builtins.diagnostics.pydocstyle.with({
extra_args = { "--config=$ROOT/setup.cfg" }
}),
null_ls.builtins.diagnostics.vint,
null_ls.builtins.diagnostics.shellcheck.with({
extra_args = { "-s", "bash", "-o", "add-default-case, check-set-e-suppressed, check-unassigned-uppercase, deprecate-which, quote-safe-variables" }
}),
null_ls.builtins.diagnostics.ansiblelint,
null_ls.builtins.formatting.json_tool,
-- require("null-ls").builtins.formatting.lua_format,
null_ls.builtins.formatting.markdownlint,
null_ls.builtins.formatting.prettier,
-- handled by lsp server
-- require("null-ls").builtins.formatting.rustfmt,
null_ls.builtins.formatting.shfmt.with({
filetypes = { "sh", "bash" },
extra_args = { "-i", "0", "-ci", "-sr" }
}),
null_ls.builtins.formatting.black,
null_ls.builtins.formatting.isort,
-- null_ls.builtins.formatting.tidy
},
})
-- 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", "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)

192
plugin-confs/nvim-cmp.lua Normal file
View File

@ -0,0 +1,192 @@
-- Setup nvim-cmp.
local cmp = require 'cmp'
local lspkind = require('lspkind')
local capabilities = require('cmp_nvim_lsp').default_capabilities()
local lspconfig = require('lspconfig')
-- luasnip setup
local luasnip = require 'luasnip'
local highlight = require('cmp.utils.highlight')
local has_words_before = function()
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then return false end
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_text(0, line-1, 0, line-1, col, {})[1]:match("^%s*$") == nil
end
lspkind.init({
symbol_map = {
Copilot = "",
},
})
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", {fg ="#6CC644"})
cmp.setup({
snippet = {
expand = function(args)
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
end,
},
capabilities = capabilities,
mapping = {
['<C-p>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { 'i', 's' }),
['<C-n>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { 'i', 's' }),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete(),
['<C-e>'] = cmp.mapping.close(),
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
-- ["<Tab>"] = cmp.mapping(function(fallback)
-- if cmp.visible() then
-- cmp.select_next_item()
-- elseif luasnip.expand_or_jumpable() then
-- luasnip.expand_or_jump()
-- else
-- fallback()
-- end
-- end, { "i", "s" }),
["<Tab>"] = vim.schedule_wrap(function(fallback)
if cmp.visible() and has_words_before() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
fallback()
end
end),
['<S-Tab>'] = cmp.mapping(function()
if cmp.visible() then
cmp.select_prev_item()
end
end, { "i", "s"}),
},
window = {
completion = {
winhighlight = "Normal:Pmenu,FloatBorder:Pmenu,Search:None",
col_offset = -3,
side_padding = 0,
border = "rounded",
borderchars = {
"",
"",
"",
"",
"",
"",
"",
"",
},
},
documentation = {
border = "rounded",
borderchars = {
"",
"",
"",
"",
"",
"",
"",
"",
},
-- padding = 15,
}
},
formatting = {
fields = { "kind", "abbr", "menu" },
format = function(entry, vim_item)
local kind = require("lspkind").cmp_format({ mode = "symbol_text", maxwidth = 75 })(entry, vim_item)
local strings = vim.split(kind.kind, "%s", { trimempty = true })
kind.kind = " " .. strings[1] .. " "
kind.menu = " (" .. strings[2] .. ")"
return kind
end,
-- format = lspkind.cmp_format({
-- mode = 'symbol_text', -- show only symbol annotations
-- menu = ({
-- buffer = "[Buffer]",
-- nvim_lsp = "[LSP]",
-- luasnip = "[LuaSnip]",
-- nvim_lua = "[Lua]",
-- latex_symbols = "[Latex]",
-- })
-- })
},
sources = cmp.config.sources({
{ name = "copilot", group_index = 2 },
{ name = 'nvim_lsp', group_index = 2 },
{ name = 'nvim_lsp_signature_help', group_index = 2 },
{ name = "path", group_index = 2 },
{ name = 'luasnip', group_index = 2 }, -- For luasnip users.
{
name = 'buffer',
option = {
get_bufnrs = function()
local bufs = {}
for _, win in ipairs(vim.api.nvim_list_wins()) do
bufs[vim.api.nvim_win_get_buf(win)] = true
end
return vim.tbl_keys(bufs)
end
}
}
-- { name = 'ultisnips' }, -- For ultisnips users.
-- { name = 'snippy' }, -- For snippy users.
}, {
{ name = 'buffer' },
}),
sorting = {
priority_weight = 2,
comparators = {
cmp.config.compare.offset,
cmp.config.compare.exact,
cmp.config.compare.score,
cmp.config.compare.kind,
cmp.config.compare.sort_text,
cmp.config.compare.length,
cmp.config.compare.order,
},
}
})
local servers = { 'bashls', 'jedi_language_server', 'sqlls', 'jsonls', 'yamlls', 'vimls', 'dotls', 'dockerls' }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
-- on_attach = my_custom_on_attach,
capabilities = capabilities,
}
end
cmp.event:on("menu_opened", function()
vim.b.copilot_suggestion_hidden = true
end)
cmp.event:on("menu_closed", function()
vim.b.copilot_suggestion_hidden = false
end)

View File

@ -0,0 +1,6 @@
require("docs-view").setup {
-- position = "right",
-- width = 90,
position = "bottom",
height = 20,
}

106
plugin-confs/nvimtree.lua Normal file
View 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" },
}

View File

@ -0,0 +1,29 @@
local onedarkpro = require("onedarkpro")
onedarkpro.setup({
theme = "onedark",
-- colors = {}, -- Override default colors. Can specify colors for "onelight" or "onedark" themes by passing in a table
-- hlgroups = {}, -- Override default highlight groups
plugins = { -- Override which plugins highlight groups are loaded
native_lsp = true,
polygot = true,
treesitter = true,
},
styles = {
comments = "italic",
functions = "italic,bold",
keywords = "italic,bold",
strings = "NONE",
variables = "bold"
},
options = {
bold = true, -- Use the themes opinionated bold styles?
italic = true, -- Use the themes opinionated italic styles?
underline = true, -- Use the themes opinionated underline styles?
undercurl = false, -- Use the themes opinionated undercurl styles?
cursorline = true, -- Use cursorline highlighting?
transparency = false, -- Use a transparent background?
terminal_colors = false, -- Use the theme's colors for Neovim's :terminal?
window_unfocussed_color = false, -- When the window is out of focus, change the normal background?
}
})
onedarkpro.load()

22
plugin-confs/presence.lua Normal file
View File

@ -0,0 +1,22 @@
require("presence"):setup({
-- General options
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
main_image = "neovim", -- Main image display (either "neovim" or "file")
-- client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
enable_line_number = false, -- Displays the current line number instead of the current project
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
-- Rich Presence text options
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
})

View 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"}
}
}

View File

@ -0,0 +1,43 @@
require('telescope').setup{
defaults = {
-- Default configuration for telescope goes here:
-- config_key = value,
layout_strategy = 'flex',
width = 0.9,
wrap_results = true,
preview = {
border = true,
borderchars = { '', '', '', '', '', '', '', '' },
title = true,
dynamic_preview_title = true,
treesitter = true,
},
mappings = {
i = {
-- map actions.which_key to <C-h> (default: <C-/>)
-- actions.which_key shows the mappings for your picker,
-- e.g. git_{create, delete, ...}_branch for the git_branches picker
["<C-h>"] = "which_key"
}
}
},
pickers = {
-- Default configuration for builtin pickers goes here:
-- picker_name = {
-- picker_config_key = value,
-- ...
-- }
-- Now the picker_config_key will be applied every time you call this
-- builtin picker
find_files = {
-- theme = "dropdown"
}
},
extensions = {
-- Your extension configuration goes here:
-- extension_name = {
-- extension_config_key = value,
-- }
-- please take a look at the readme of the extension you want to configure
}
}

View File

@ -0,0 +1,34 @@
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,
},
incremental_selection = {
enable = true,
keymaps = {
init_selection = "gnn",
node_incremental = "grn",
scope_incremental = "grc",
node_decremental = "grm",
},
},
}

47
plugin-confs/trouble.lua Normal file
View File

@ -0,0 +1,47 @@
require("trouble").setup {
position = "right", -- position of the list can be: bottom, top, left, right
height = 10, -- height of the trouble list when position is top or bottom
width = 50, -- width of the list when position is left or right
icons = true, -- use devicons for filenames
mode = "workspace_diagnostics", -- "workspace_diagnostics", "document_diagnostics", "quickfix", "lsp_references", "loclist"
fold_open = "", -- icon used for open folds
fold_closed = "", -- icon used for closed folds
group = true, -- group results by file
padding = true, -- add an extra new line on top of the list
action_keys = { -- key mappings for actions in the trouble list
-- map to {} to remove a mapping, for example:
-- close = {},
close = "q", -- close the list
cancel = "<esc>", -- cancel the preview and get back to your last window / buffer / cursor
refresh = "r", -- manually refresh
jump = {"<cr>", "<tab>"}, -- jump to the diagnostic or open / close folds
open_split = { "<c-x>" }, -- open buffer in new split
open_vsplit = { "<c-v>" }, -- open buffer in new vsplit
open_tab = { "<c-t>" }, -- open buffer in new tab
jump_close = {"o"}, -- jump to the diagnostic and close the list
toggle_mode = "m", -- toggle between "workspace" and "document" diagnostics mode
toggle_preview = "P", -- toggle auto_preview
hover = "K", -- opens a small popup with the full multiline message
preview = "p", -- preview the diagnostic location
close_folds = {"zM", "zm"}, -- close all folds
open_folds = {"zR", "zr"}, -- open all folds
toggle_fold = {"zA", "za"}, -- toggle fold of current file
previous = "k", -- preview item
next = "j" -- next item
},
indent_lines = true, -- add an indent guide below the fold icons
auto_open = false, -- automatically open the list when you have diagnostics
auto_close = false, -- automatically close the list when you have no diagnostics
auto_preview = true, -- automatically preview the location of the diagnostic. <esc> to close preview and go back to last window
auto_fold = false, -- automatically fold a file trouble list at creation
auto_jump = {"lsp_definitions"}, -- for the given modes, automatically jump if there is only a single result
signs = {
-- icons / text used for a diagnostic
error = "",
warning = "",
hint = "",
information = "",
other = ""
},
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
}

70
plugin-confs/whichkey.lua Normal file
View File

@ -0,0 +1,70 @@
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 = true, -- 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
show_keys = true, -- show the key strokes for your commands
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" },
},
disable = {
buftypes = {},
filetypes = { "TelescopePrompt" },
},
}

View File

@ -0,0 +1,8 @@
let g:dashboard_custom_header = [
\ ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗',
\ ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║',
\ ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║',
\ ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║',
\ ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║',
\ ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝',
\]