update to lua config
This commit is contained in:
1 parent
0f860cf709
commit
a95aab0e51
65 files changed
+254
-930
No files matched your search
@@ -1,10 +0,0 @@
|
||||
" 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
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
-- Load core configurations
|
||||
require('core.options')
|
||||
require('core.keymaps')
|
||||
require('core.plugins')
|
||||
require('core.autocmds')
|
||||
require('plugins.lsp')
|
||||
require('plugins.ui')
|
||||
require('plugins.ai')
|
||||
require('plugins.colorscheme')
|
||||
@@ -1,101 +0,0 @@
|
||||
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
|
||||
" call code actions function
|
||||
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/copilot-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/treesitter-context.lua
|
||||
source ~/.config/nvim/plugin-confs/whichkey.lua
|
||||
source ~/.config/nvim/plugin-confs/telescope.lua
|
||||
source ~/.config/nvim/plugin-confs/telescope-file-browser.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/lsp-format.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-lint.lua
|
||||
source ~/.config/nvim/plugin-confs/codecompanion.lua
|
||||
source ~/.config/nvim/plugin-confs/luasnip.lua
|
||||
source ~/.config/nvim/plugin-confs/fidget.lua
|
||||
source ~/.config/nvim/plugin-confs/rainbow-delimiters.lua
|
||||
" source ~/.config/nvim/plugin-confs/symbols-outline.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-colorizer.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-dap-python.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-dap-bash.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-dap-ui.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-dap-virtual-text.lua
|
||||
" source ~/.config/nvim/plugin-confs/copilot.lua
|
||||
source ~/.config/nvim/plugin-confs/copilot-cmp.lua
|
||||
source ~/.config/nvim/plugin-confs/nvim-notify.lua
|
||||
" source ~/.config/nvim/plugin-confs/lsp-signature.lua
|
||||
" source ~/.config/nvim/plugin-confs/nvim-docs-view.lua
|
||||
|
||||
" source ~/.config/nvim/plugin-confs/neodev.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/plugin-confs/catppuccin.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! Keybindings execute ":e ~/.config/nvim/keybindings.vim"
|
||||
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! PS execute ":PackerSync"
|
||||
|
||||
" set termguicolors
|
||||
" colorscheme doom-one
|
||||
" colorscheme onedark
|
||||
colorscheme catppuccin-macchiato
|
||||
highlight Pmenu ctermfg=white ctermbg=black gui=NONE guifg=white guibg=#282C34
|
||||
highlight PmenuSel guifg=purple guibg=red
|
||||
|
||||
" run code actions on cursor hold if lsp is attached
|
||||
"autocmd CursorHold,CursorHoldI * lua require('code_action_utils').code_action_listener()
|
||||
autocmd CursorHold,CursorHoldI * lua if vim.tbl_isempty(vim.lsp.buf_get_clients()) then require('code_action_utils').code_action_listener() end
|
||||
-198
@@ -1,198 +0,0 @@
|
||||
nmap <C-u> <C-u>zz
|
||||
nmap n nzzzv
|
||||
nmap N Nzzzv
|
||||
|
||||
" paste visually without yanking to clipboard
|
||||
xnoremap <leader>p "_dP
|
||||
|
||||
" reselect visual selection after indent
|
||||
vnoremap < <gv
|
||||
vnoremap > >gv
|
||||
|
||||
" move selected line(s) up or down and respect indent
|
||||
vnoremap J :m '>+1<CR>gv=gv
|
||||
vnoremap K :m '<-2<CR>gv=gv
|
||||
|
||||
" search
|
||||
nnoremap // :Telescope current_buffer_fuzzy_find<CR>
|
||||
nnoremap ?? :Telescope lsp_document_symbols<CR>
|
||||
|
||||
" nnoremap Q !!$SHELL<CR>
|
||||
" nnoremap rn :lua vim.lsp.buf.rename()<CR>
|
||||
|
||||
nnoremap <C-J> :bnext<CR>
|
||||
nnoremap <C-K> :bprev<CR>
|
||||
|
||||
nnoremap <C-T> :wa<CR>:FloatermToggle floatterm<CR>
|
||||
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>
|
||||
"fix issue with space in terminal leader key
|
||||
tnoremap <space> <space>
|
||||
|
||||
|
||||
nnoremap gA :lua vim.lsp.buf.code_actions()<CR>
|
||||
nnoremap gd :Telescope lsp_definitions<CR>
|
||||
nnoremap gDc :Telescope lsp_implementations<CR>
|
||||
nnoremap gDf :Telescope lsp_definitions<CR>
|
||||
nnoremap gF :edit <cfile><CR>
|
||||
nnoremap gT :Telescope lsp_type_definitions<CR>
|
||||
nnoremap gb :Gitsigns blame_line<CR>
|
||||
nnoremap gi :Telescope lsp_implementations<CR>
|
||||
nnoremap gj :Telescope jumplist<CR>
|
||||
nnoremap gl :lua vim.lsp.buf.code_lens()<CR>
|
||||
nnoremap gr :Telescope lsp_references<CR>
|
||||
nnoremap gs :lua vim.lsp.buf.signature_help()<CR>
|
||||
|
||||
nnoremap <leader>bb :Telescope buffers<CR>
|
||||
nnoremap <leader>bk :bdelete<CR>
|
||||
nnoremap <leader>bn :bnext<CR>
|
||||
nnoremap <leader>bp :bprev<CR>
|
||||
|
||||
nnoremap <leader>ca :lua vim.lsp.buf.code_action()<CR>
|
||||
nnoremap <leader>cA :lua vim.lsp.buf.code_action()<CR>
|
||||
nnoremap <leader>cc :CodeCompanionChat<CR>
|
||||
nnoremap <leader>ci :CodeCompanion
|
||||
nnoremap <leader>cd :Telescope diagnostics<CR>
|
||||
nnoremap <leader>cDn :lua vim.diagnostic.goto_next()<CR>
|
||||
nnoremap <leader>cDp :lua vim.diagnostic.goto_prev()<CR>
|
||||
nnoremap <leader>cl :lua vim.diagnostic.setloclist()<CR>
|
||||
nnoremap <silent> <leader>cp :vert Copilot panel<CR>
|
||||
nnoremap <leader>Ca :CodeCompanionActions<CR>
|
||||
nnoremap <leader>Cc :CodeCompanionChat<CR>
|
||||
nnoremap <leader>Cc :CodeCompanionChat<CR>
|
||||
nnoremap <leader>Ci :CodeCompanion
|
||||
nnoremap <leader>Ct :CodeCompanionChat Toggle<CR>
|
||||
vnoremap <leader>Cc :CodeCompanionChat Add<CR>
|
||||
vnoremap <leader>Ce :CodeCompanion /explain<CR>
|
||||
vnoremap <leader>Cf :CodeCompanion /fix<CR>
|
||||
vnoremap <leader>Cl :CodeCompanion /lsp<CR>
|
||||
vnoremap <leader>CT :CodeCompanion /tests<CR>
|
||||
|
||||
nnoremap <leader>db :lua require("dap").toggle_breakpoint()<CR>
|
||||
nnoremap <leader>dc :lua require("dap").continue()<CR>
|
||||
nnoremap <leader>di :lua require("dap").step_into()<CR>
|
||||
nnoremap <leader>do :lua require("dap").step_over()<CR>
|
||||
nnoremap <leader>dO :lua require("dap").step_out()<CR>
|
||||
nnoremap <leader>dr :lua require("dap").repl.open()<CR>
|
||||
nnoremap <leader>dl :lua require("dap").run_last()<CR>
|
||||
nnoremap <leader>dh :lua require("dap.ui.widgets").hover()<CR>
|
||||
nnoremap <leader>dp :lua require("dap.ui.widgets").preview()<CR>
|
||||
nnoremap <leader>df :lua require('dap.ui.widgets').centered_float(require('dap.ui.widgets').frames)<CR>
|
||||
nnoremap <leader>ds :lua require('dap.ui.widgets').centered_float(require('dap.ui.widgets').scopes)<CR>
|
||||
nnoremap <leader>dut :lua require("dapui").toggle()<CR>
|
||||
nnoremap <leader>duo :lua require("dapui").open()<CR>
|
||||
nnoremap <leader>duc :lua require("dapui").close()<CR>
|
||||
nnoremap <leader>dPm :lua require("dap-python").test_method()<CR>
|
||||
nnoremap <leader>dPc :lua require("dap-python").test_class()<CR>
|
||||
nnoremap <leader>dPs :lua require("dap-python").debug_selection()<CR>
|
||||
|
||||
vnoremap <leader>dh :lua require("dap.ui.widgets").hover()<CR>
|
||||
vnoremap <leader>dp :lua require("dap.ui.widgets").preview()<CR>
|
||||
vnoremap <leader>dpe :lua require("dapui").eval()<CR>
|
||||
|
||||
nnoremap <F10> :lua require('dap').step_over()<CR>
|
||||
nnoremap <F11> :lua require('dap').step_into()<CR>
|
||||
nnoremap <F12> :lua require('dap').step_out()<CR>
|
||||
|
||||
nnoremap <leader>D :Dotenv .env<CR>
|
||||
|
||||
nnoremap <leader>ec :e ~/.config/nvim/init.vim<CR>
|
||||
nnoremap <leader>ek :e ~/.config/nvim/keybindings.vim<CR>
|
||||
nnoremap <leader>ep :e ~/.config/nvim/lua/plugins.lua<CR>
|
||||
nnoremap <leader>es :e ~/.config/nvim/lua/settings.lua<CR>
|
||||
|
||||
nnoremap <leader>fb :Telescope file_browser<CR>
|
||||
nnoremap <leader>fc :Telescope color_names theme=dropdown layout_config={width=0.45,height=25,prompt_position="bottom"} layout_strategy=vertical<CR>
|
||||
nnoremap <leader>ff :Telescope find_files<CR>
|
||||
nnoremap <leader>fg :Telescope glyph theme=dropdown layout_config={width=0.45,height=35,prompt_position="bottom"} layout_strategy=vertical<CR>
|
||||
nnoremap <leader>fr :Telescope oldfiles<CR>
|
||||
|
||||
nnoremap <leader>gb :Gitsigns blame_line<CR>
|
||||
nnoremap <leader>gc :Telescope git_commits<CR>
|
||||
nnoremap <leader>gf :Telescope git_files<CR>
|
||||
nnoremap <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>
|
||||
|
||||
nnoremap <leader>hc :Telescope commands<CR>
|
||||
nnoremap <leader>hdc :Telescope dap commands<CR>
|
||||
nnoremap <leader>hdC :Telescope dap configurations<CR>
|
||||
nnoremap <leader>hdb :Telescope dap list_breakpoints<CR>
|
||||
nnoremap <leader>hdv :Telescope dap variables<CR>
|
||||
nnoremap <leader>hdf :Telescope dap frames<CR>
|
||||
nnoremap <leader>hv :Telescope vim_options<CR>
|
||||
nnoremap <leader>hk :Telescope keymaps<CR>
|
||||
nnoremap <leader>hs :Telescope spell_suggest<CR>
|
||||
|
||||
nnoremap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
||||
|
||||
nnoremap <leader>j :AnyJump<CR>
|
||||
|
||||
nnoremap K :lua vim.lsp.buf.hover()<CR>
|
||||
|
||||
nnoremap <leader>ld :Telescope lsp_definitions<CR>
|
||||
nnoremap <leader>lD :Telescope diagnostics<CR>
|
||||
nnoremap <leader>la :lua vim.lsp.buf.code_action()<CR>
|
||||
nnoremap <leader>lci :Telescope lsp_incoming_calls<CR>
|
||||
nnoremap <leader>lco :Telescope lsp_outgoing_calls<CR>
|
||||
nnoremap <leader>lh :lua vim.lsp.buf.signature_help()<CR>
|
||||
nnoremap <leader>li :Telescope lsp_implementations<CR>
|
||||
nnoremap <leader>lr :Telescope lsp_references<CR>
|
||||
nnoremap <leader>lR :lua vim.lsp.buf.rename()<CR>
|
||||
nnoremap <leader>ls :Telescope lsp_document_symbols<CR>
|
||||
nnoremap <leader>lt :Telescope lsp_type_definitions<CR>
|
||||
nnoremap <leader>lw :Telescope lsp_dynamic_workspace_symbols<CR>
|
||||
|
||||
nnoremap <leader>n :NvimTreeToggle<CR>
|
||||
" nnoremap <leader>r :NvimTreeRefresh<CR>
|
||||
|
||||
|
||||
nnoremap <leader>ob :Telescope file_browser<CR>
|
||||
nnoremap <leader>oc :CodeCompanionChat<CR>
|
||||
nnoremap <leader>oC :e ~/.config/nvim/init.vim<CR>
|
||||
nnoremap <leader>oB :FloatermNew --title=btop --opener=vsplit btop<CR>
|
||||
nnoremap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||
nnoremap <leader>of :wa<CR>:FloatermToggle floatterm<CR>
|
||||
nnoremap <leader>oh :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>
|
||||
nnoremap <leader>on :FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp<CR>
|
||||
nnoremap <leader>op :FloatermNew --title=ipython --name=ipython --opener=split --wintype=vsplit --position=botright --width=0.5 ipython<CR>
|
||||
nnoremap <leader>oP :FloatermNew --title=ipython-full --name=ipython-full --opener=edit --width=1.0 --height=1.0 ipython<CR>
|
||||
nnoremap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||
nnoremap <leader>ot :FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>
|
||||
|
||||
nnoremap <leader>sc :nohls<CR>
|
||||
nnoremap <leader>sC :Telescope commands<CR>
|
||||
nnoremap <leader>sf :Telescope find_files<CR>
|
||||
nnoremap <leader>sg :Telescope live_grep<CR>
|
||||
nnoremap <leader>sG :Telescope glyph<CR>
|
||||
nnoremap <leader>sh :Telescope command_history<CR>
|
||||
nnoremap <leader>sm :Telescope man_pages<CR>
|
||||
nnoremap <leader>s/ :Telescope search_history<CR>
|
||||
|
||||
nnoremap <silent> <Leader>tc :Telescope colorscheme<CR>
|
||||
nnoremap <silent> <leader>tf :wa<CR>:FloatermToggle floatterm<CR>
|
||||
nnoremap <silent> <leader>tp :FloatermToggle ipython<CR>
|
||||
nnoremap <silent> <leader>tP :FloatermToggle ipython-full<CR>
|
||||
nnoremap <silent> <leader>tt :FloatermToggle split-term<CR>
|
||||
nnoremap <silent> <leader>td :DBUIToggle<CR>
|
||||
nnoremap <silent> <leader>tc :CodeCompanionChat Toggle<CR>
|
||||
nnoremap <silent> <leader>Tc :Telescope color_names theme=dropdown layout_config={width=0.45,height=25,prompt_position="bottom"} layout_strategy=vertical<CR>
|
||||
nnoremap <silent> <leader>Tg :Telescope glyph theme=dropdown layout_config={width=0.45,height=35,prompt_position="bottom"} layout_strategy=vertical<CR>
|
||||
nnoremap <silent> <leader>Tn :Telescope notify<CR>
|
||||
nnoremap <silent> <leader>Tt :Telescope<CR>
|
||||
|
||||
nnoremap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<CR>
|
||||
nnoremap <leader>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
|
||||
nnoremap <leader>wr :lua vim.lsp.buf.remove_workspace_folder()<CR>
|
||||
|
||||
nmap <silent> <leader>x <cmd>!chmod +x %<CR>
|
||||
|
||||
nnoremap <leader>y "+
|
||||
vmap <leader>y "+
|
||||
@@ -1,15 +0,0 @@
|
||||
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, ctx, config)
|
||||
-- do something with result - e.g. check if empty and show some indication such as a sign
|
||||
end)
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,51 @@
|
||||
local augroup = vim.api.nvim_create_augroup
|
||||
local autocmd = vim.api.nvim_create_autocmd
|
||||
|
||||
-- Restore cursor position
|
||||
local restore_cursor = augroup('RestoreCursor', { clear = true })
|
||||
autocmd('BufReadPost', {
|
||||
group = restore_cursor,
|
||||
callback = function()
|
||||
local mark = vim.api.nvim_buf_get_mark(0, '"')
|
||||
local lcount = vim.api.nvim_buf_line_count(0)
|
||||
if mark[1] > 0 and mark[1] <= lcount then
|
||||
pcall(vim.api.nvim_win_set_cursor, 0, mark)
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- Help and man pages in vertical split
|
||||
local help_config = augroup('HelpConfig', { clear = true })
|
||||
autocmd('FileType', {
|
||||
group = help_config,
|
||||
pattern = { 'help', 'man' },
|
||||
command = 'wincmd L'
|
||||
})
|
||||
|
||||
-- Terminal settings
|
||||
local term_config = augroup('TermConfig', { clear = true })
|
||||
autocmd('TermOpen', {
|
||||
group = term_config,
|
||||
pattern = '*',
|
||||
command = 'setlocal nonumber norelativenumber'
|
||||
})
|
||||
|
||||
local highlight_yank = augroup('HighlightYank', { clear = true })
|
||||
autocmd('TextYankPost', {
|
||||
group = highlight_yank,
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 1000 })
|
||||
end,
|
||||
})
|
||||
|
||||
-- Code actions on cursor hold
|
||||
-- local code_action = augroup('CodeAction', { clear = true })
|
||||
-- autocmd({ 'CursorHold', 'CursorHoldI' }, {
|
||||
-- group = code_action,
|
||||
-- callback = function()
|
||||
-- if vim.tbl_isempty(vim.lsp.buf_get_clients()) then
|
||||
-- require('code_action_utils').code_action_listener()
|
||||
-- end
|
||||
-- end
|
||||
-- })
|
||||
@@ -0,0 +1,158 @@
|
||||
local map = vim.keymap.set
|
||||
local opts = { silent = true, noremap = true }
|
||||
|
||||
-- Leader key
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- Custom commands
|
||||
vim.api.nvim_create_user_command('PS', ':PackerSync', {})
|
||||
vim.api.nvim_create_user_command('Reload', 'source ~/.config/nvim/init.lua', {})
|
||||
vim.api.nvim_create_user_command('Config', 'edit ~/.config/nvim/init.lua', {})
|
||||
vim.api.nvim_create_user_command('Plugins', 'edit ~/.config/nvim/lua/core/plugins.lua', {})
|
||||
vim.api.nvim_create_user_command('Keymaps', 'edit ~/.config/nvim/lua/core/keymaps.lua', {})
|
||||
|
||||
-- Basic mappings
|
||||
map('n', '<C-u>', '<C-u>zz', opts)
|
||||
map('n', 'n', 'nzzzv', opts)
|
||||
map('n', 'N', 'Nzzzv', opts)
|
||||
map('x', '<leader>p', '"_dP', opts) -- paste without yanking
|
||||
map('v', '<', '<gv', opts) -- reselect after indent
|
||||
map('v', '>', '>gv', opts)
|
||||
map('v', 'J', ":m '>+1<CR>gv=gv", opts) -- move lines
|
||||
map('v', 'K', ":m '<-2<CR>gv=gv", opts)
|
||||
|
||||
-- Buffer navigation
|
||||
map('n', '<C-J>', ':bnext<CR>', opts)
|
||||
map('n', '<C-K>', ':bprev<CR>', opts)
|
||||
map('n', '<leader>bb', ':Telescope buffers<CR>', opts)
|
||||
map('n', '<leader>bk', ':bdelete<CR>', opts)
|
||||
map('n', '<leader>bn', ':bnext<CR>', opts)
|
||||
map('n', '<leader>bp', ':bprev<CR>', opts)
|
||||
|
||||
-- Terminal mappings
|
||||
map('n', '<C-T>', ':wa<CR>:FloatermToggle floatterm<CR>', opts)
|
||||
map('t', '<C-T>', '<C-\\><C-n>:FloatermToggle floatterm<CR>', opts)
|
||||
map('t', '<Esc>', '<C-\\><C-n>', opts)
|
||||
map('n', '<leader>tt', ':FloatermToggle split-term<CR>', opts)
|
||||
map('t', '<leader>tt', '<C-\\><C-N>:FloatermToggle split-term<CR>', opts)
|
||||
map('t', '<leader>tf', '<C-\\><C-N>:FloatermToggle floatterm<CR>', opts)
|
||||
map('t', '<leader>tp', '<C-\\><C-N>:FloatermToggle ipython<CR>', opts)
|
||||
map('t', '<leader>tP', '<C-\\><C-N>:FloatermToggle ipython-full<CR>', opts)
|
||||
map('t', '<space>', '<space>', opts) -- fix space in terminal
|
||||
|
||||
-- LSP mappings
|
||||
map('n', 'gA', vim.lsp.buf.code_action, opts)
|
||||
map('n', 'gd', ':Telescope lsp_definitions<CR>', opts)
|
||||
map('n', 'gDc', ':Telescope lsp_implementations<CR>', opts)
|
||||
map('n', 'gDf', ':Telescope lsp_definitions<CR>', opts)
|
||||
map('n', 'gF', ':edit <cfile><CR>', opts)
|
||||
map('n', 'gT', ':Telescope lsp_type_definitions<CR>', opts)
|
||||
map('n', 'gb', ':Gitsigns blame_line<CR>', opts)
|
||||
map('n', 'gi', ':Telescope lsp_implementations<CR>', opts)
|
||||
map('n', 'gj', ':Telescope jumplist<CR>', opts)
|
||||
map('n', 'gl', vim.lsp.codelens.run, opts)
|
||||
map('n', 'gr', ':Telescope lsp_references<CR>', opts)
|
||||
map('n', 'gs', vim.lsp.buf.signature_help, opts)
|
||||
map('n', 'K', vim.lsp.buf.hover, opts)
|
||||
|
||||
-- Code Companion and Copilot
|
||||
map('n', '<leader>cc', ':CodeCompanionChat<CR>', opts)
|
||||
map('n', '<leader>ci', ':CodeCompanion ', opts)
|
||||
map('n', '<leader>cp', ':vert Copilot panel<CR>', opts)
|
||||
map('n', '<leader>Ca', ':CodeCompanionActions<CR>', opts)
|
||||
map('v', '<leader>Cc', ':CodeCompanionChat Add<CR>', opts)
|
||||
map('v', '<leader>Ce', ':CodeCompanion /explain<CR>', opts)
|
||||
map('v', '<leader>Cf', ':CodeCompanion /fix<CR>', opts)
|
||||
map('v', '<leader>Cl', ':CodeCompanion /lsp<CR>', opts)
|
||||
map('v', '<leader>CT', ':CodeCompanion /tests<CR>', opts)
|
||||
|
||||
-- Telescope mappings
|
||||
map('n', '//', ':Telescope current_buffer_fuzzy_find<CR>', opts)
|
||||
map('n', '??', ':Telescope lsp_document_symbols<CR>', opts)
|
||||
map('n', '<leader>fc',
|
||||
':Telescope color_names theme=dropdown layout_config={width=0.45,height=25,prompt_position="bottom"} layout_strategy=vertical<CR>',
|
||||
opts)
|
||||
map('n', '<leader>ff', ':Telescope find_files<CR>', opts)
|
||||
map('n', '<leader>sf', ':Telescope find_files<CR>', opts)
|
||||
map('n', '<leader>fg', ':Telescope live_grep<CR>', opts)
|
||||
map('n', '<leader>fG',
|
||||
':Telescope glyph theme=dropdown layout_config={width=0.45,height=35,prompt_position="bottom"} layout_strategy=vertical<CR>',
|
||||
opts)
|
||||
map('n', '<leader>fb', ':Telescope file_browser<CR>', opts)
|
||||
map('n', '<leader>fr', ':Telescope oldfiles<CR>', opts)
|
||||
|
||||
-- File explorer and tools
|
||||
map('n', '<leader>n', ':NvimTreeToggle<CR>', opts)
|
||||
map('n', '<leader>D', ':Dotenv .env<CR>', opts)
|
||||
|
||||
-- Git mappings
|
||||
map('n', '<leader>gg', ':FloatermNew --title=lazygit --width=1.0 --height=1.0 --opener=vsplit lazygit<CR>', opts)
|
||||
map('n', '<leader>gc', ':Telescope git_commits<CR>', opts)
|
||||
map('n', '<leader>gf', ':Telescope git_files<CR>', opts)
|
||||
|
||||
-- Misc utilities
|
||||
map('n', '<leader>x', '<cmd>!chmod +x %<CR>', opts)
|
||||
map('n', '<leader>y', '"+', opts)
|
||||
map('v', '<leader>y', '"+', opts)
|
||||
|
||||
-- Terminal applications
|
||||
map('n', '<leader>oB', ':FloatermNew --title=btop --opener=vsplit btop<CR>', opts)
|
||||
map('n', '<leader>od', ':FloatermNew --title=lazydocker --opener=vsplit --width=0.75 --height=0.75 lazydocker<CR>', opts)
|
||||
map('n', '<leader>on', ':FloatermNew --title=ncmpcpp --opener=vsplit ncmpcpp --width=1 --height=1<CR>', opts)
|
||||
map('n', '<leader>or', ':FloatermNew --title=ranger --opener=vsplit --width=1.0 --height=1.0 ranger --cmd="cd $PWD"<CR>',
|
||||
opts)
|
||||
|
||||
map('n', "gpc", ':lua require("goto-preview").close_all_win()<CR>')
|
||||
map('n', "gpd", ':lua require("goto-preview").goto_preview_definition()<CR>')
|
||||
map('n', "gpi", ':lua require("goto-preview").goto_preview_implementation()<CR>')
|
||||
|
||||
-- Workspace management
|
||||
map('n', '<leader>wa', vim.lsp.buf.add_workspace_folder, opts)
|
||||
map('n', '<leader>wr', vim.lsp.buf.remove_workspace_folder, opts)
|
||||
map('n', '<leader>wl', function()
|
||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
||||
end, opts)
|
||||
|
||||
-- Helper
|
||||
map('n', '<leader>hc', ':Telescope commands<CR>')
|
||||
map('n', '<leader>hv', ':Telescope vim_options<CR>')
|
||||
map('n', '<leader>hk', ':Telescope keymaps<CR>')
|
||||
map('n', '<leader>hs', ':Telescope spell_suggest<CR>')
|
||||
map('n', '<leader>hm', ':Telescope man_pages<CR>')
|
||||
|
||||
-- LSP
|
||||
map('n', '<leader>ld', ':Telescope lsp_definitions<CR>')
|
||||
map('n', '<leader>lD', ':Telescope diagnostic<CR>')
|
||||
map('n', '<leader>la', ':lua vim.lsp.buf.code_action()<CR>')
|
||||
map('n', '<leader>lci', ':Telescope lsp_incoming_calls<CR>')
|
||||
map('n', '<leader>lco', ':Telescope lsp_outgoing_calls<CR>')
|
||||
map('n', '<leader>lh', ':lua vim.lsp.buf.signature_help()<CR>')
|
||||
map('n', '<leader>li', ':Telescope lsp_implementations<CR>')
|
||||
map('n', '<leader>lr', ':Telescope lsp_references<CR>')
|
||||
map('n', '<leader>lR', ':lua vim.lsp.buf.rename()<CR>')
|
||||
map('n', '<leader>ls', ':Telescope lsp_document_symbols<CR>')
|
||||
map('n', '<leader>lt', ':Telescope lsp_type_definitions<CR>')
|
||||
map('n', '<leader>lw', ':Telescope lsp_dynamic_workspace_symbols<CR>')
|
||||
|
||||
|
||||
map('n', '<leader>ob', ':Telescope file_browser<CR>')
|
||||
map('n', '<leader>ot',
|
||||
':FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=vsplit --position=botright --width=0.5<CR>')
|
||||
map('n', '<leader>oh',
|
||||
':FloatermNew --title=floaterm --name=split-term --opener=edit --wintype=split --position=botright --height=0.45<CR>')
|
||||
map('n', '<leader>op',
|
||||
':FloatermNew --title=ipython --name=ipython --opener=split --wintype=vsplit --position=botright --width=0.5 ipython<CR>')
|
||||
map('n', '<leader>oP',
|
||||
':FloatermNew --title=ipython-full --name=ipython-full --opener=edit --width=1.0 --height=1.0 ipython<CR>')
|
||||
|
||||
map('n', '<leader>oc', ':CodeCompanionChat<CR>')
|
||||
map('n', '<leader>of', ':FloatermToggle floatterm<CR>')
|
||||
|
||||
map('n', '<leader>sc', ':nohls<CR>')
|
||||
map('n', '<leader>sf', ':Telescope find_files<CR>')
|
||||
map('n', '<leader>sg', ':Telescope live_grep<CR>')
|
||||
map('n', '<leader>sh', ':Telescope command_history<CR>')
|
||||
map('n', '<leader>sm', ':Telescope man_pages<CR>')
|
||||
map('n', '<leader>s/', ':Telescope search_history<CR>')
|
||||
map('n', '<leader>sc', ':nohls<CR>')
|
||||
File renamed without changes.
@@ -27,69 +27,7 @@ require('packer').startup(function(use)
|
||||
-- }}}
|
||||
|
||||
-- LSP/DEV {{{
|
||||
|
||||
-- COPILOT {{{
|
||||
use {
|
||||
"zbirenbaum/copilot.lua",
|
||||
event = "VimEnter",
|
||||
config = function()
|
||||
require('copilot').setup({
|
||||
panel = {
|
||||
enabled = false,
|
||||
auto_refresh = false,
|
||||
keymap = {
|
||||
jump_prev = "[[",
|
||||
jump_next = "]]",
|
||||
accept = "<CR>",
|
||||
refresh = "gr",
|
||||
open = "<C-CR>"
|
||||
},
|
||||
layout = {
|
||||
position = "right", -- | top | left | right
|
||||
ratio = 0.4
|
||||
}
|
||||
},
|
||||
suggestion = {
|
||||
enabled = false,
|
||||
auto_trigger = false,
|
||||
debounce = 75,
|
||||
keymap = {
|
||||
accept = "<C-l>",
|
||||
-- accept = "<Right>",
|
||||
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 = {
|
||||
trace = "verbose",
|
||||
settings = {
|
||||
advanced = {
|
||||
listCount = 10, -- #completions for panel
|
||||
inlineSuggestCount = 4 -- #completions for getCompletions
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
use { "zbirenbaum/copilot-cmp" }
|
||||
-- }}}
|
||||
|
||||
use({
|
||||
"olimorris/codecompanion.nvim",
|
||||
@@ -131,15 +69,11 @@ require('packer').startup(function(use)
|
||||
use { 'lukas-reineke/lsp-format.nvim' }
|
||||
use 'mfussenegger/nvim-lint'
|
||||
|
||||
-- DAP {{{
|
||||
|
||||
use 'mfussenegger/nvim-dap'
|
||||
use 'nvim-neotest/nvim-nio'
|
||||
use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }
|
||||
use { 'mfussenegger/nvim-dap-python' }
|
||||
use { 'theHamsta/nvim-dap-virtual-text' }
|
||||
|
||||
-- }}}
|
||||
-- use 'mfussenegger/nvim-dap'
|
||||
-- use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }
|
||||
-- use { 'mfussenegger/nvim-dap-python' }
|
||||
-- use { 'theHamsta/nvim-dap-virtual-text' }
|
||||
|
||||
-- DADBOD {{{
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
local function map(m, k, v)
|
||||
vim.keymap.set(m, k, v, { silent = true, noremap = true })
|
||||
end
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
||||
require("plugins.ai.codecompanion")
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,3 @@
|
||||
require("plugins.colorscheme.catppuccin")
|
||||
require("plugins.colorscheme.dracula")
|
||||
require("plugins.colorscheme.onedarkpro")
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,10 @@
|
||||
require('plugins.lsp.copilot-cmp')
|
||||
require('plugins.lsp.lsp-format')
|
||||
require('plugins.lsp.lsp-kind')
|
||||
require('plugins.lsp.lspconfig')
|
||||
-- require('plugins.lsp.lspfuzzy')
|
||||
require('plugins.lsp.lsplines')
|
||||
require('plugins.lsp.luasnip')
|
||||
require('plugins.lsp.null-ls')
|
||||
require('plugins.lsp.nvim-cmp')
|
||||
require('plugins.lsp.nvim-lint')
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,17 @@
|
||||
require('plugins.ui.bufferline')
|
||||
require('plugins.ui.copilot-lualine')
|
||||
require('plugins.ui.dashboard-nvim')
|
||||
require('plugins.ui.fidget')
|
||||
-- require('plugins.ui.git-blame')
|
||||
require('plugins.ui.gitsigns')
|
||||
require('plugins.ui.lualine')
|
||||
require('plugins.ui.nvim-colorizer')
|
||||
require('plugins.ui.nvim-notify')
|
||||
require('plugins.ui.nvimtree')
|
||||
require('plugins.ui.presence')
|
||||
require('plugins.ui.rainbow-delimiters')
|
||||
require('plugins.ui.telescope-file-browser')
|
||||
require('plugins.ui.telescope')
|
||||
require('plugins.ui.treesitter-context')
|
||||
require('plugins.ui.treesitter')
|
||||
require('plugins.ui.whichkey')
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -60,7 +60,7 @@ ts.setup({
|
||||
}
|
||||
|
||||
})
|
||||
ts.load_extension('dap')
|
||||
-- ts.load_extension('dap')
|
||||
ts.load_extension('fzf')
|
||||
ts.load_extension('glyph')
|
||||
ts.load_extension('color_names')
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,11 +0,0 @@
|
||||
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)
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
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
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
let g:dashboard_custom_header = [
|
||||
\ ' ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗',
|
||||
\ ' ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║',
|
||||
\ ' ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║',
|
||||
\ ' ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║',
|
||||
\ ' ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║',
|
||||
\ ' ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝',
|
||||
\]
|
||||
@@ -1,57 +0,0 @@
|
||||
-- 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
|
||||
@@ -1,19 +0,0 @@
|
||||
-- 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
|
||||
})
|
||||
@@ -1,19 +0,0 @@
|
||||
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
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
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 = 15, -- 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 = 0, -- adjust float windows x position.
|
||||
floating_window_off_y = -1, -- adjust float windows y position.
|
||||
fix_pos = true, -- trueset to true, the floating window will not auto-close until finish all parameters
|
||||
hint_enable = false, -- 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
|
||||
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
|
||||
@@ -1,3 +0,0 @@
|
||||
require("neodev").setup({
|
||||
-- add any options here, or leave empty to use the default settings
|
||||
})
|
||||
@@ -1,73 +0,0 @@
|
||||
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"] = "",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
local dap = require('dap')
|
||||
dap.adapters.bashdb = {
|
||||
type = 'executable',
|
||||
command = vim.fn.stdpath("data") ..
|
||||
'/mason/packages/bash-debug-adapter/bash-debug-adapter',
|
||||
name = 'bashdb'
|
||||
}
|
||||
|
||||
dap.configurations.sh = {
|
||||
{
|
||||
type = 'bashdb',
|
||||
request = 'launch',
|
||||
name = "Launch file",
|
||||
showDebugOutput = true,
|
||||
pathBashdb = vim.fn.stdpath("data") ..
|
||||
'/mason/packages/bash-debug-adapter/extension/bashdb_dir/bashdb',
|
||||
pathBashdbLib = vim.fn.stdpath("data") ..
|
||||
'/mason/packages/bash-debug-adapter/extension/bashdb_dir',
|
||||
trace = true,
|
||||
file = "${file}",
|
||||
program = "${file}",
|
||||
cwd = '${workspaceFolder}',
|
||||
pathCat = "cat",
|
||||
pathBash = "/bin/bash",
|
||||
pathMkfifo = "mkfifo",
|
||||
pathPkill = "pkill",
|
||||
args = {},
|
||||
env = {},
|
||||
terminalKind = "integrated"
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
local dp = require('dap-python')
|
||||
dp.test_runner = 'pytest'
|
||||
|
||||
-- local dap = require('dap')
|
||||
-- dap.adapters.python = function(cb, config)
|
||||
-- if config.request == 'attach' then
|
||||
-- ---@diagnostic disable-next-line: undefined-field
|
||||
-- local port = (config.connect or config).port
|
||||
-- ---@diagnostic disable-next-line: undefined-field
|
||||
-- local host = (config.connect or config).host or '127.0.0.1'
|
||||
-- cb({
|
||||
-- type = 'server',
|
||||
-- port = assert(port,
|
||||
-- '`connect.port` is required for a python `attach` configuration'),
|
||||
-- host = host,
|
||||
-- options = { source_filetype = 'python' }
|
||||
-- })
|
||||
-- else
|
||||
-- cb({
|
||||
-- type = 'executable',
|
||||
-- command = '/home/sudacode/Projects/Python/debugpy/env/bin/python',
|
||||
-- args = { '-m', 'debugpy.adapter' },
|
||||
-- options = { source_filetype = 'python' }
|
||||
-- })
|
||||
-- end
|
||||
-- end
|
||||
-- dap.configurations.python = {
|
||||
-- {
|
||||
-- -- The first three options are required by nvim-dap
|
||||
-- type = 'python', -- the type here established the link to the adapter definition: `dap.adapters.python`
|
||||
-- request = 'launch',
|
||||
-- name = "Launch file",
|
||||
|
||||
-- -- Options below are for debugpy, see https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for supported options
|
||||
|
||||
-- program = "${file}", -- This configuration will launch the current file if used.
|
||||
-- pythonPath = function()
|
||||
-- -- debugpy supports launching an application with a different interpreter then the one used to launch debugpy itself.
|
||||
-- -- The code below looks for a `venv` or `.venv` folder in the current directly and uses the python within.
|
||||
-- -- You could adapt this - to for example use the `VIRTUAL_ENV` environment variable.
|
||||
-- local cwd = vim.fn.getcwd()
|
||||
-- if vim.fn.executable(cwd .. '/env/bin/python') == 1 then
|
||||
-- return cwd .. '/env/bin/python'
|
||||
-- elseif vim.fn.executable(cwd .. '/.env/bin/python') == 1 then
|
||||
-- return cwd .. '/.env/bin/python'
|
||||
-- else
|
||||
-- return '/usr/bin/python'
|
||||
-- end
|
||||
-- end
|
||||
-- }
|
||||
-- }
|
||||
@@ -1,7 +0,0 @@
|
||||
require("dapui").setup()
|
||||
-- local dap, dapui = require("dap"), require("dapui")
|
||||
-- dap.listeners.after.event_initialized["dapui_config"] =
|
||||
-- function() dapui.open() end
|
||||
-- dap.listeners.before.event_terminated["dapui_config"] =
|
||||
-- function() dapui.close() end
|
||||
-- dap.listeners.before.event_exited["dapui_config"] = function() dapui.close() end
|
||||
@@ -1,34 +0,0 @@
|
||||
local opts = {
|
||||
enabled = true, -- enable this plugin (the default)
|
||||
enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
|
||||
highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
|
||||
highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
|
||||
show_stop_reason = true, -- show stop reason when stopped for exceptions
|
||||
commented = false, -- prefix virtual text with comment string
|
||||
only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
|
||||
all_references = false, -- show virtual text on all all references of the variable (not only definitions)
|
||||
clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping)
|
||||
--- A callback that determines how a variable is displayed or whether it should be omitted
|
||||
--- @param variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable
|
||||
--- @param buf number
|
||||
--- @param stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame
|
||||
--- @param node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`)
|
||||
--- @param options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text
|
||||
--- @return string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed
|
||||
display_callback = function(variable, buf, stackframe, node, options)
|
||||
if options.virt_text_pos == 'inline' then
|
||||
return ' = ' .. variable.value
|
||||
else
|
||||
return variable.name .. ' = ' .. variable.value
|
||||
end
|
||||
end,
|
||||
-- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line
|
||||
virt_text_pos = vim.fn.has 'nvim-0.10' == 1 and 'inline' or 'eol',
|
||||
|
||||
-- experimental features:
|
||||
all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
|
||||
virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
|
||||
virt_text_win_col = 80 -- position the virtual text at a fixed window column (starting from the first text column) ,
|
||||
-- e.g. 80 to position at column 80, see `:h nvim_buf_set_extmark()`
|
||||
}
|
||||
require("nvim-dap-virtual-text").setup(opts)
|
||||
@@ -1,6 +0,0 @@
|
||||
require("docs-view").setup {
|
||||
-- position = "right",
|
||||
-- width = 90,
|
||||
position = "bottom",
|
||||
height = 20,
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
-- 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"}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
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
|
||||
}
|
||||
Reference in new issue
Block a user