1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

Compare commits

..

No commits in common. "a3c8b3d5b59526f247bffa56ad9fba723d61feaf" and "95d3b2f2d86c0f452f9d615eb1c7113eb644c48e" have entirely different histories.

4 changed files with 11 additions and 38 deletions

View File

@ -35,6 +35,7 @@ cmp.setup {
{ name = "ultisnips" }, -- For ultisnips user. { name = "ultisnips" }, -- For ultisnips user.
{ name = "path" }, -- for path completion { name = "path" }, -- for path completion
{ name = "buffer", keyword_length = 2 }, -- for buffer word completion { name = "buffer", keyword_length = 2 }, -- for buffer word completion
{ name = "emoji", insert = true }, -- emoji completion
}, },
completion = { completion = {
keyword_length = 1, keyword_length = 1,
@ -49,14 +50,12 @@ cmp.setup {
menu = { menu = {
nvim_lsp = "[LSP]", nvim_lsp = "[LSP]",
ultisnips = "[US]", ultisnips = "[US]",
nvim_lua = "[Lua]",
path = "[Path]", path = "[Path]",
buffer = "[Buffer]", buffer = "[Buffer]",
emoji = "[Emoji]", emoji = "[Emoji]",
omni = "[Omni]", omni = "[Omni]",
}, },
show_labelDetails = true,
maxwidth = 40,
ellipsis_char = "...",
}, },
}, },
} }

View File

@ -32,6 +32,7 @@ local plugin_specs = {
"hrsh7th/cmp-path", "hrsh7th/cmp-path",
"hrsh7th/cmp-buffer", "hrsh7th/cmp-buffer",
"hrsh7th/cmp-omni", "hrsh7th/cmp-omni",
"hrsh7th/cmp-emoji",
"quangnguyen30192/cmp-nvim-ultisnips", "quangnguyen30192/cmp-nvim-ultisnips",
}, },
config = function() config = function()
@ -125,15 +126,6 @@ local plugin_specs = {
"nvim-telescope/telescope-symbols.nvim", "nvim-telescope/telescope-symbols.nvim",
}, },
}, },
{
"ibhagwan/fzf-lua",
-- optional for icon support
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
-- calling `setup` is optional for customization
require("fzf-lua").setup {}
end,
},
{ {
"MeanderingProgrammer/markdown.nvim", "MeanderingProgrammer/markdown.nvim",
main = "render-markdown", main = "render-markdown",
@ -554,26 +546,6 @@ local plugin_specs = {
ft = "lua", -- only load on lua files ft = "lua", -- only load on lua files
opts = {}, opts = {},
}, },
{
"CopilotC-Nvim/CopilotChat.nvim",
branch = "canary",
dependencies = {
{ "zbirenbaum/copilot.lua" }, -- or github/copilot.vim
{ "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
},
opts = {
debug = true, -- Enable debugging
-- See Configuration section for rest
},
-- See Commands section for default commands if you want to lazy load on them
},
{
"zbirenbaum/copilot.lua",
cmd = "Copilot",
config = function()
require("copilot").setup {}
end,
},
} }
require("lazy").setup { require("lazy").setup {

View File

@ -101,14 +101,16 @@ augroup END
" ref: https://vi.stackexchange.com/a/169/15292 " ref: https://vi.stackexchange.com/a/169/15292
function! s:handle_large_file() abort function! s:handle_large_file() abort
let g:file_size_limit = 524288 " 0.5MB let g:large_file = 10485760 " 10MB
let f = expand("<afile>") let f = expand("<afile>")
if getfsize(f) > g:file_size_limit || getfsize(f) == -2 if getfsize(f) > g:large_file || getfsize(f) == -2
setlocal eventignore=all set eventignore+=all
" turning off relative number helps a lot " turning off relative number helps a lot
setlocal norelativenumber set norelativenumber
setlocal noswapfile bufhidden=unload undolevels=-1 setlocal noswapfile bufhidden=unload buftype=nowrite undolevels=-1
else
set eventignore-=all relativenumber
endif endif
endfunction endfunction

View File

@ -121,7 +121,7 @@ set completeopt+=menuone " Show menu even if there is only one item
set completeopt-=preview " Disable the preview window set completeopt-=preview " Disable the preview window
set pumheight=10 " Maximum number of items to show in popup menu set pumheight=10 " Maximum number of items to show in popup menu
set pumblend=5 " pseudo transparency for completion menu set pumblend=10 " pseudo transparency for completion menu
set winblend=0 " pseudo transparency for floating window set winblend=0 " pseudo transparency for floating window