add dadbod and notify

This commit is contained in:
ksyasuda 2023-08-15 23:31:31 -07:00
parent 250a1d7388
commit 94c33a04dd
No known key found for this signature in database
8 changed files with 121 additions and 32 deletions

View File

@ -42,6 +42,7 @@ source ~/.config/nvim/plugin-confs/nvim-dap-ui.lua
source ~/.config/nvim/plugin-confs/nvim-dap-virtual-text.lua source ~/.config/nvim/plugin-confs/nvim-dap-virtual-text.lua
" source ~/.config/nvim/plugin-confs/copilot.lua " source ~/.config/nvim/plugin-confs/copilot.lua
source ~/.config/nvim/plugin-confs/copilot-cmp.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/lsp-signature.lua
" source ~/.config/nvim/plugin-confs/nvim-docs-view.lua " source ~/.config/nvim/plugin-confs/nvim-docs-view.lua
@ -75,6 +76,7 @@ source ~/.config/nvim/plugin-confs/catppuccin.lua
command! Reload execute "source ~/.config/nvim/init.vim" command! Reload execute "source ~/.config/nvim/init.vim"
command! Config execute ":e ~/.config/nvim/init.vim" command! Config execute ":e ~/.config/nvim/init.vim"
command! Plugins execute ":e ~/.config/nvim/lua/plugins.lua" 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! Settings execute ":e ~/.config/nvim/lua/settings.lua"
command! Env execute ":Dotenv .env" command! Env execute ":Dotenv .env"
command! MakeTags !ctags -R . command! MakeTags !ctags -R .

View File

@ -98,11 +98,17 @@ nnoremap <F10> :lua require('dap').step_over()<CR>
nnoremap <F11> :lua require('dap').step_into()<CR> nnoremap <F11> :lua require('dap').step_into()<CR>
nnoremap <F12> :lua require('dap').step_out()<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>fb :Telescope file_browser<cr>
nnoremap <leader>ff :Telescope find_files<cr> nnoremap <leader>ff :Telescope find_files<cr>
nnoremap <leader>fg :Telescope live_grep<cr> nnoremap <leader>fg :Telescope live_grep<cr>
nnoremap <leader>fh :Telescope oldfiles<cr> nnoremap <leader>fr :Telescope oldfiles<cr>
" nnoremap <leader>fd :e ~/.config/nvim/init.vim<cr>
nnoremap <leader>gb :Gitsigns blame_line<CR> nnoremap <leader>gb :Gitsigns blame_line<CR>
nnoremap <leader>gc :Telescope git_commits<CR> nnoremap <leader>gc :Telescope git_commits<CR>
@ -173,6 +179,7 @@ nnoremap <silent> <leader>tf :wa<CR>:FloatermToggle floatterm<CR>
nnoremap <silent> <leader>tp :FloatermToggle ipython<CR> nnoremap <silent> <leader>tp :FloatermToggle ipython<CR>
nnoremap <silent> <leader>tP :FloatermToggle ipython-full<CR> nnoremap <silent> <leader>tP :FloatermToggle ipython-full<CR>
nnoremap <silent> <leader>tt :FloatermToggle split-term<CR> nnoremap <silent> <leader>tt :FloatermToggle split-term<CR>
nnoremap <silent> <leader>td :DBUIToggle<CR>
nnoremap <leader>wa :lua vim.lsp.buf.add_workspace_folder()<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>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>

View File

@ -1,3 +1,5 @@
local lsp_dev = {}
vim.cmd [[packadd packer.nvim]] vim.cmd [[packadd packer.nvim]]
require('packer').startup(function(use) require('packer').startup(function(use)
use 'wbthomason/packer.nvim' use 'wbthomason/packer.nvim'
@ -87,6 +89,8 @@ require('packer').startup(function(use)
use { "zbirenbaum/copilot-cmp" } use { "zbirenbaum/copilot-cmp" }
-- }}} -- }}}
-- CHATGPT {{{
use({ use({
"jackMort/ChatGPT.nvim", "jackMort/ChatGPT.nvim",
commit = "24bcca7", commit = "24bcca7",
@ -217,26 +221,28 @@ require('packer').startup(function(use)
"nvim-telescope/telescope.nvim" "nvim-telescope/telescope.nvim"
} }
}) })
-- }}}
use({ use({
"iamcco/markdown-preview.nvim", "iamcco/markdown-preview.nvim",
run = function() vim.fn["mkdp#util#install"]() end run = function() vim.fn["mkdp#util#install"]() end
}) })
use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' }
use 'L3MON4D3/LuaSnip' use 'L3MON4D3/LuaSnip'
use { 'hrsh7th/nvim-cmp' } use 'folke/neodev.nvim'
use { 'hrsh7th/cmp-nvim-lsp' }
use { 'hrsh7th/cmp-nvim-lua' }
use { 'hrsh7th/cmp-nvim-lsp-signature-help' }
use { 'hrsh7th/cmp-path' }
use { 'hrsh7th/cmp-cmdline' }
use { 'hrsh7th/cmp-buffer' }
use 'saadparwaiz1/cmp_luasnip' use 'saadparwaiz1/cmp_luasnip'
use { 'hrsh7th/cmp-buffer' }
use { 'hrsh7th/cmp-cmdline' }
use { 'hrsh7th/cmp-nvim-lsp' }
use { 'hrsh7th/cmp-nvim-lsp-document-symbol' } use { 'hrsh7th/cmp-nvim-lsp-document-symbol' }
use { 'hrsh7th/cmp-nvim-lsp-signature-help' }
use { 'hrsh7th/cmp-nvim-lua' }
use { 'hrsh7th/cmp-path' }
use { 'hrsh7th/nvim-cmp' }
use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' }
use { 'jose-elias-alvarez/null-ls.nvim' }
use { 'neovim/nvim-lspconfig' } use { 'neovim/nvim-lspconfig' }
use { 'onsails/lspkind-nvim' } use { 'onsails/lspkind-nvim' }
use { 'jose-elias-alvarez/null-ls.nvim' }
use 'folke/neodev.nvim'
-- DAP {{{ -- DAP {{{
@ -247,13 +253,64 @@ require('packer').startup(function(use)
-- }}} -- }}}
-- DADBOD {{{
use { 'tpope/vim-dadbod' }
use { 'kristijanhusak/vim-dadbod-ui' }
use { 'kristijanhusak/vim-dadbod-completion' }
-- }}}
-- }}} -- }}}
-- UI {{{ -- UI {{{
use { use {
'nvim-lualine/lualine.nvim', 'glepnir/dashboard-nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true } -- event = 'VimEnter',
config = function()
require('dashboard').setup {
theme = 'doom', -- theme is doom and hyper default is hyper
disable_move = false, -- default is false disable move keymap for hyper
shortcut_type = 'number', -- shorcut type 'letter' or 'number'
change_to_vcs_root = false, -- default is false,for open file in hyper mru. it will change to the root of vcs
config = {
header = { "NVIM DASHBOARD" }, -- your header
center = {
{
icon = '',
icon_hl = 'Title',
desc = 'Find File ',
desc_hl = 'String',
key = 'b',
keymap = 'SPC f f',
key_hl = 'Number',
action = 'lua print(2)'
}
-- {
-- icon = ' ',
-- desc = 'Find Dotfiles',
-- key = 'f',
-- keymap = 'SPC f d',
-- action = 'lua print(3)'
-- }
},
footer = {} -- your footer
},
hide = {
statusline = true, -- hide statusline default is true
tabline = true, -- hide the tabline
winbar = true -- hide winbar
}
-- preview = {
-- command = "bat", -- preview command
-- file_path -- preview file path
-- file_height -- preview file height
-- file_width -- preview file width
-- },
}
end,
requires = { 'nvim-tree/nvim-web-devicons' }
} }
use { use {
'j-hui/fidget.nvim', 'j-hui/fidget.nvim',
@ -264,14 +321,18 @@ require('packer').startup(function(use)
} }
end end
} }
use 'norcalli/nvim-colorizer.lua' use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
use { 'kyazdani42/nvim-web-devicons' }
use { 'norcalli/nvim-colorizer.lua' }
use { 'akinsho/nvim-bufferline.lua' } use { 'akinsho/nvim-bufferline.lua' }
use { 'andweeb/presence.nvim' } use { 'andweeb/presence.nvim' }
use { 'folke/which-key.nvim' } use { 'folke/which-key.nvim' }
use { 'glepnir/dashboard-nvim' }
use { 'kyazdani42/nvim-tree.lua' } use { 'kyazdani42/nvim-tree.lua' }
use 'kyazdani42/nvim-web-devicons'
use { 'lewis6991/gitsigns.nvim' } use { 'lewis6991/gitsigns.nvim' }
use { 'rcarriga/nvim-notify' }
use { 'stevearc/dressing.nvim' } use { 'stevearc/dressing.nvim' }
-- }}} -- }}}
@ -299,6 +360,7 @@ require('packer').startup(function(use)
use 'jiangmiao/auto-pairs' use 'jiangmiao/auto-pairs'
use 'pechorin/any-jump.vim' use 'pechorin/any-jump.vim'
use 'tpope/vim-commentary' use 'tpope/vim-commentary'
use 'tpope/vim-dotenv'
use 'tpope/vim-surround' use 'tpope/vim-surround'
use 'voldikss/vim-floaterm' use 'voldikss/vim-floaterm'
use 'wakatime/vim-wakatime' use 'wakatime/vim-wakatime'

View File

@ -5,7 +5,8 @@ local l = vim.lsp
g.mapleader = " " g.mapleader = " "
g.maplocalleader = ',' g.maplocalleader = ','
g.fzf_command = 'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"' g.fzf_command =
'fzf --height 90% --width=85% --layout=reverse --preview "bat --color=always {}"'
o.completeopt = "menu,menuone,noselect" o.completeopt = "menu,menuone,noselect"
o.showmode = false o.showmode = false
o.termguicolors = true o.termguicolors = true
@ -30,7 +31,8 @@ o.cursorline = true
o.scrolloff = 8 o.scrolloff = 8
o.sidescrolloff = 8 o.sidescrolloff = 8
o.wildmenu = true o.wildmenu = true
o.wildignore = '.git,.hg,.svn,CVS,.DS_Store,.idea,.vscode,.vscode-test,node_modules' o.wildignore =
'.git,.hg,.svn,CVS,.DS_Store,.idea,.vscode,.vscode-test,node_modules'
o.showmatch = true o.showmatch = true
o.list = true o.list = true
o.listchars = 'tab:»·,trail:·,nbsp:·,extends:>,precedes:<' o.listchars = 'tab:»·,trail:·,nbsp:·,extends:>,precedes:<'
@ -43,17 +45,15 @@ o.updatetime = 300
o.timeoutlen = 500 o.timeoutlen = 500
o.pumwidth = 35 o.pumwidth = 35
o.foldmethod = 'marker' o.foldmethod = 'marker'
g.db_ui_use_nerd_fonts = 1
local border = { local border = {
{ "", "FloatBorder" }, { "", "FloatBorder" }, { "", "FloatBorder" }, { "", "FloatBorder" },
{ "", "FloatBorder" }, { "", "FloatBorder" }, { "", "FloatBorder" }, { "", "FloatBorder" },
{ "", "FloatBorder" }, { "", "FloatBorder" }, { "", "FloatBorder" }
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
{ "", "FloatBorder" },
} }
l.handlers["textDocument/signatureHelp"] = vim.lsp.with(vim.lsp.handlers.signature_help, { border = border }) l.handlers["textDocument/signatureHelp"] =
l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border }) vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover,
{ border = border })

View File

@ -159,6 +159,7 @@ cmp.setup({
{ name = 'nvim_lsp', group_index = 2 }, { name = 'nvim_lsp', group_index = 2 },
{ name = 'nvim_lsp_signature_help', group_index = 2 }, { name = 'nvim_lsp_signature_help', group_index = 2 },
{ name = 'nvim_lsp_document_symbol', group_index = 2 }, { name = 'nvim_lsp_document_symbol', group_index = 2 },
{ name = 'vim-dadbod-completion', group_index = 2 },
{ name = 'neorg', group_index = 2 }, -- For luasnip users. { name = 'neorg', group_index = 2 }, -- For luasnip users.
{ name = 'luasnip', group_index = 2 }, -- For luasnip users. { name = 'luasnip', group_index = 2 }, -- For luasnip users.
{ {

View File

@ -0,0 +1,17 @@
require("notify").setup({
background_colour = "NotifyBackground",
fps = 144,
icons = {
DEBUG = "",
ERROR = "",
INFO = "",
TRACE = "",
WARN = ""
},
level = 2,
minimum_width = 50,
render = "default",
stages = "fade_in_slide_out",
timeout = 5000,
top_down = true
})

View File

@ -125,7 +125,7 @@ wk.register({
b = "File Browser", b = "File Browser",
f = "Find in Current Directory", f = "Find in Current Directory",
g = "Live Grep", g = "Live Grep",
h = "File History" r = "File Recent"
}, },
g = { g = {
name = "Git", name = "Git",