add dadbod and notify
This commit is contained in:
parent
250a1d7388
commit
94c33a04dd
2
init.vim
2
init.vim
@ -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/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
|
||||
|
||||
@ -75,6 +76,7 @@ source ~/.config/nvim/plugin-confs/catppuccin.lua
|
||||
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 .
|
||||
|
@ -98,11 +98,17 @@ 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>ff :Telescope find_files<cr>
|
||||
nnoremap <leader>fg :Telescope live_grep<cr>
|
||||
nnoremap <leader>fh :Telescope oldfiles<cr>
|
||||
" nnoremap <leader>fd :e ~/.config/nvim/init.vim<cr>
|
||||
nnoremap <leader>fr :Telescope oldfiles<cr>
|
||||
|
||||
nnoremap <leader>gb :Gitsigns blame_line<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-full<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>wl :lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>
|
||||
|
@ -1,3 +1,3 @@
|
||||
local function map(m, k, v)
|
||||
vim.keymap.set(m, k, v, {silent = true, noremap = true})
|
||||
vim.keymap.set(m, k, v, { silent = true, noremap = true })
|
||||
end
|
||||
|
@ -1,3 +1,5 @@
|
||||
local lsp_dev = {}
|
||||
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
require('packer').startup(function(use)
|
||||
use 'wbthomason/packer.nvim'
|
||||
@ -87,6 +89,8 @@ require('packer').startup(function(use)
|
||||
|
||||
use { "zbirenbaum/copilot-cmp" }
|
||||
-- }}}
|
||||
-- CHATGPT {{{
|
||||
|
||||
use({
|
||||
"jackMort/ChatGPT.nvim",
|
||||
commit = "24bcca7",
|
||||
@ -217,26 +221,28 @@ require('packer').startup(function(use)
|
||||
"nvim-telescope/telescope.nvim"
|
||||
}
|
||||
})
|
||||
|
||||
-- }}}
|
||||
use({
|
||||
"iamcco/markdown-preview.nvim",
|
||||
run = function() vim.fn["mkdp#util#install"]() end
|
||||
})
|
||||
|
||||
use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' }
|
||||
use 'L3MON4D3/LuaSnip'
|
||||
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-cmdline' }
|
||||
use { 'hrsh7th/cmp-buffer' }
|
||||
use 'folke/neodev.nvim'
|
||||
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-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 { 'onsails/lspkind-nvim' }
|
||||
use { 'jose-elias-alvarez/null-ls.nvim' }
|
||||
use 'folke/neodev.nvim'
|
||||
|
||||
-- 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 {{{
|
||||
|
||||
use {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
||||
'glepnir/dashboard-nvim',
|
||||
-- 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 {
|
||||
'j-hui/fidget.nvim',
|
||||
@ -264,14 +321,18 @@ require('packer').startup(function(use)
|
||||
}
|
||||
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 { '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 { 'rcarriga/nvim-notify' }
|
||||
use { 'stevearc/dressing.nvim' }
|
||||
|
||||
-- }}}
|
||||
@ -299,6 +360,7 @@ require('packer').startup(function(use)
|
||||
use 'jiangmiao/auto-pairs'
|
||||
use 'pechorin/any-jump.vim'
|
||||
use 'tpope/vim-commentary'
|
||||
use 'tpope/vim-dotenv'
|
||||
use 'tpope/vim-surround'
|
||||
use 'voldikss/vim-floaterm'
|
||||
use 'wakatime/vim-wakatime'
|
||||
|
@ -5,7 +5,8 @@ local l = vim.lsp
|
||||
|
||||
g.mapleader = " "
|
||||
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.showmode = false
|
||||
o.termguicolors = true
|
||||
@ -30,7 +31,8 @@ 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.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:<'
|
||||
@ -43,17 +45,15 @@ o.updatetime = 300
|
||||
o.timeoutlen = 500
|
||||
o.pumwidth = 35
|
||||
o.foldmethod = 'marker'
|
||||
g.db_ui_use_nerd_fonts = 1
|
||||
|
||||
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/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = border })
|
||||
l.handlers["textDocument/signatureHelp"] =
|
||||
vim.lsp.with(vim.lsp.handlers.signature_help, { border = border })
|
||||
l.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover,
|
||||
{ border = border })
|
||||
|
@ -159,6 +159,7 @@ cmp.setup({
|
||||
{ name = 'nvim_lsp', group_index = 2 },
|
||||
{ name = 'nvim_lsp_signature_help', 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 = 'luasnip', group_index = 2 }, -- For luasnip users.
|
||||
{
|
||||
|
17
plugin-confs/nvim-notify.lua
Normal file
17
plugin-confs/nvim-notify.lua
Normal 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
|
||||
})
|
@ -125,7 +125,7 @@ wk.register({
|
||||
b = "File Browser",
|
||||
f = "Find in Current Directory",
|
||||
g = "Live Grep",
|
||||
h = "File History"
|
||||
r = "File Recent"
|
||||
},
|
||||
g = {
|
||||
name = "Git",
|
||||
|
Loading…
Reference in New Issue
Block a user