This commit is contained in:
sudacode 2023-08-15 12:03:05 -07:00
parent 1566186961
commit d3f94e12d6
6 changed files with 261 additions and 170 deletions

View File

@ -25,6 +25,7 @@ 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/telescope-file-browser.lua
source ~/.config/nvim/plugin-confs/dressing.lua
source ~/.config/nvim/plugin-confs/code_actions.lua
source ~/.config/nvim/plugin-confs/goto-preview.lua
@ -41,7 +42,9 @@ 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.lua
source ~/.config/nvim/plugin-confs/copilot-cmp.lua
source ~/.config/nvim/plugin-confs/neorg.lua
" source ~/.config/nvim/plugin-confs/lsp-signature.lua
" source ~/.config/nvim/plugin-confs/nvim-docs-view.lua

View File

@ -8,123 +8,8 @@ require('packer').startup(function(use)
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",
event = "VimEnter",
config = function()
vim.defer_fn(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, 100)
end
}
use {
"zbirenbaum/copilot-cmp",
config = function()
require("copilot_cmp").setup({
suggestion = { enabled = false },
panel = { enabled = false }
-- method = "getCompletionsCycling",
-- formatters = {
-- insert_text = require("copilot_cmp.format").remove_existing
-- }
})
end
}
use {
"nvim-neorg/neorg",
-- tag = "*",
ft = "norg",
after = "nvim-treesitter", -- You may want to specify Telescope here as well
config = function()
require('neorg').setup {
load = {
["core.defaults"] = {}, -- Loads default behaviour
["core.concealer"] = {}, -- Adds pretty icons to your documents
["core.completion"] = { config = { engine = "nvim-cmp" } }, -- Adds completion
["core.dirman"] = { -- Manages Neorg workspaces
config = { workspaces = { notes = "~/notes" } }
}
}
}
end
}
use { 'junegunn/fzf', run = function() vim.fn['fzf#install']() end }
use 'junegunn/fzf.vim'
use 'norcalli/nvim-colorizer.lua'
use 'jiangmiao/auto-pairs'
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 { "MunifTanjim/nui.nvim" }
-- TELESCOPE
use { 'nvim-telescope/telescope.nvim' }
use { 'nvim-telescope/telescope-file-browser.nvim' }
use 'nvim-telescope/telescope-dap.nvim'
@ -134,11 +19,29 @@ require('packer').startup(function(use)
run =
'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build'
}
-- UI
use { 'akinsho/nvim-bufferline.lua' }
use {
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
}
use { 'https://git.sr.ht/~whynothugo/lsp_lines.nvim' }
use { 'onsails/lspkind-nvim' }
use 'norcalli/nvim-colorizer.lua'
use { 'glepnir/dashboard-nvim' }
use 'kyazdani42/nvim-web-devicons'
use { 'stevearc/dressing.nvim' }
use {
'j-hui/fidget.nvim',
tag = 'legacy',
config = function() require("fidget").setup {} end
}
-- LSP/DEV
use { "zbirenbaum/copilot.lua", event = "VimEnter" }
use { "zbirenbaum/copilot-cmp" }
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' }
@ -146,23 +49,9 @@ require('packer').startup(function(use)
use { 'hrsh7th/cmp-path' }
use { 'hrsh7th/cmp-cmdline' }
use { 'hrsh7th/cmp-buffer' }
use { 'saadparwaiz1/cmp_luasnip' }
use { 'hrsh7th/cmp-nvim-lsp-document-symbol' }
use {
'j-hui/fidget.nvim',
tag = 'legacy',
config = function()
require("fidget").setup {
-- options
}
end
}
use { 'jose-elias-alvarez/null-ls.nvim' }
use { 'https://git.sr.ht/~whynothugo/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({
"jackMort/ChatGPT.nvim",
commit = "24bcca7",
@ -172,16 +61,35 @@ require('packer').startup(function(use)
}
})
-- EXTRA
use {
"nvim-neorg/neorg",
-- tag = "*",
ft = "norg",
after = "nvim-treesitter" -- You may want to specify Telescope here as well
}
use 'pechorin/any-jump.vim'
use { 'jose-elias-alvarez/null-ls.nvim' }
use { 'rmagatti/goto-preview' }
use 'folke/neodev.nvim'
use 'voldikss/vim-floaterm'
use 'wakatime/vim-wakatime'
use { 'junegunn/fzf', run = function() vim.fn['fzf#install']() end }
use { 'folke/which-key.nvim' }
use { 'kyazdani42/nvim-tree.lua' }
use { 'lewis6991/gitsigns.nvim' }
use({
"iamcco/markdown-preview.nvim",
run = function() vim.fn["mkdp#util#install"]() end
})
use 'folke/neodev.nvim'
-- DEBUG
use 'mfussenegger/nvim-dap'
use { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }
use 'mfussenegger/nvim-dap-python'
use 'theHamsta/nvim-dap-virtual-text'
-- COLORSCHEMES
use { 'Mofiqul/dracula.nvim' }
use({
'NTBBloodbath/doom-one.nvim',

View File

@ -0,0 +1,8 @@
require("copilot_cmp").setup({
suggestion = { enabled = false },
panel = { enabled = false }
-- method = "getCompletionsCycling",
-- formatters = {
-- insert_text = require("copilot_cmp.format").remove_existing
-- }
})

View File

@ -1,38 +1,51 @@
require('copilot').setup({
panel = {
enabled = true,
enabled = false,
auto_refresh = false,
keymap = {
jump_prev = "[[",
jump_next = "]]",
accept = "<CR>",
refresh = "gr",
open = "<S-CR>"
open = "<C-CR>"
},
layout = {
position = "right", -- | top | left | right
ratio = 0.4
}
},
suggestion = {
enabled = true,
enabled = false,
auto_trigger = false,
debounce = 75,
keymap = {
accept = "<M-l>",
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,
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 = {},
server_opts_overrides = {
trace = "verbose",
settings = {
advanced = {
listCount = 10, -- #completions for panel
inlineSuggestCount = 4 -- #completions for getCompletions
}
}
}
})

149
plugin-confs/dressing.lua Normal file
View File

@ -0,0 +1,149 @@
require('dressing').setup({
input = {
-- Set to false to disable the vim.ui.input implementation
enabled = true,
-- Default prompt string
default_prompt = "Input:",
-- Can be 'left', 'right', or 'center'
title_pos = "left",
-- When true, <Esc> will close the modal
insert_only = true,
-- When true, input will start in insert mode.
start_in_insert = true,
-- These are passed to nvim_open_win
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "cursor",
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
prefer_width = 0.4,
width = nil,
-- min_width and max_width can be a list of mixed types.
-- min_width = {20, 0.2} means "the greater of 20 columns or 20% of total"
max_width = { 140, 0.85 },
min_width = { 20, 0.25 },
buf_options = {},
win_options = {
-- Window transparency (0-100)
winblend = 10,
-- Disable line wrapping
wrap = false,
-- Indicator for when text exceeds window
list = true,
listchars = "precedes:…,extends:…",
-- Increase this for more context when text scrolls off the window
sidescrolloff = 0
},
-- Set to `false` to disable
mappings = {
n = { ["<Esc>"] = "Close", ["<CR>"] = "Confirm" },
i = {
["<C-c>"] = "Close",
["<CR>"] = "Confirm",
["<Up>"] = "HistoryPrev",
["<Down>"] = "HistoryNext"
}
},
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end,
-- see :help dressing_get_config
get_config = nil
},
select = {
-- Set to false to disable the vim.ui.select implementation
enabled = true,
-- Priority list of preferred vim.select implementations
backend = { "telescope", "fzf_lua", "fzf", "builtin", "nui" },
-- Trim trailing `:` from prompt
trim_prompt = true,
-- Options for telescope selector
-- These are passed into the telescope picker directly. Can be used like:
-- telescope = require('telescope.themes').get_ivy({...})
telescope = nil,
-- Options for fzf selector
fzf = { window = { width = 0.5, height = 0.4 } },
-- Options for fzf-lua
fzf_lua = {
-- winopts = {
-- height = 0.5,
-- width = 0.5,
-- },
},
-- Options for nui Menu
nui = {
position = "50%",
size = nil,
relative = "editor",
border = { style = "rounded" },
buf_options = { swapfile = false, filetype = "DressingSelect" },
win_options = { winblend = 10 },
max_width = 80,
max_height = 40,
min_width = 40,
min_height = 10
},
-- Options for built-in selector
builtin = {
-- These are passed to nvim_open_win
border = "rounded",
-- 'editor' and 'win' will default to being centered
relative = "editor",
buf_options = {},
win_options = {
-- Window transparency (0-100)
winblend = 10,
cursorline = true,
cursorlineopt = "both"
},
-- These can be integers or a float between 0 and 1 (e.g. 0.4 for 40%)
-- the min_ and max_ options can be a list of mixed types.
-- max_width = {140, 0.8} means "the lesser of 140 columns or 80% of total"
width = nil,
max_width = { 140, 0.8 },
min_width = { 40, 0.2 },
height = nil,
max_height = 0.9,
min_height = { 10, 0.2 },
-- Set to `false` to disable
mappings = {
["<Esc>"] = "Close",
["<C-c>"] = "Close",
["<CR>"] = "Confirm"
},
override = function(conf)
-- This is the config that will be passed to nvim_open_win.
-- Change values here to customize the layout
return conf
end
},
-- Used to override format_item. See :help dressing-format
format_item_override = {},
-- see :help dressing_get_config
get_config = nil
}
})

10
plugin-confs/neorg.lua Normal file
View File

@ -0,0 +1,10 @@
require('neorg').setup {
load = {
["core.defaults"] = {}, -- Loads default behaviour
["core.concealer"] = {}, -- Adds pretty icons to your documents
["core.completion"] = { config = { engine = "nvim-cmp" } }, -- Adds completion
["core.dirman"] = { -- Manages Neorg workspaces
config = { workspaces = { notes = "~/notes" } }
}
}
}