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.
a3c8b3d5b5
...
95d3b2f2d8
@ -35,6 +35,7 @@ cmp.setup {
|
||||
{ name = "ultisnips" }, -- For ultisnips user.
|
||||
{ name = "path" }, -- for path completion
|
||||
{ name = "buffer", keyword_length = 2 }, -- for buffer word completion
|
||||
{ name = "emoji", insert = true }, -- emoji completion
|
||||
},
|
||||
completion = {
|
||||
keyword_length = 1,
|
||||
@ -49,14 +50,12 @@ cmp.setup {
|
||||
menu = {
|
||||
nvim_lsp = "[LSP]",
|
||||
ultisnips = "[US]",
|
||||
nvim_lua = "[Lua]",
|
||||
path = "[Path]",
|
||||
buffer = "[Buffer]",
|
||||
emoji = "[Emoji]",
|
||||
omni = "[Omni]",
|
||||
},
|
||||
show_labelDetails = true,
|
||||
maxwidth = 40,
|
||||
ellipsis_char = "...",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@ -32,6 +32,7 @@ local plugin_specs = {
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-omni",
|
||||
"hrsh7th/cmp-emoji",
|
||||
"quangnguyen30192/cmp-nvim-ultisnips",
|
||||
},
|
||||
config = function()
|
||||
@ -125,15 +126,6 @@ local plugin_specs = {
|
||||
"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",
|
||||
main = "render-markdown",
|
||||
@ -554,26 +546,6 @@ local plugin_specs = {
|
||||
ft = "lua", -- only load on lua files
|
||||
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 {
|
||||
|
||||
@ -101,14 +101,16 @@ augroup END
|
||||
|
||||
" ref: https://vi.stackexchange.com/a/169/15292
|
||||
function! s:handle_large_file() abort
|
||||
let g:file_size_limit = 524288 " 0.5MB
|
||||
let g:large_file = 10485760 " 10MB
|
||||
let f = expand("<afile>")
|
||||
|
||||
if getfsize(f) > g:file_size_limit || getfsize(f) == -2
|
||||
setlocal eventignore=all
|
||||
if getfsize(f) > g:large_file || getfsize(f) == -2
|
||||
set eventignore+=all
|
||||
" turning off relative number helps a lot
|
||||
setlocal norelativenumber
|
||||
setlocal noswapfile bufhidden=unload undolevels=-1
|
||||
set norelativenumber
|
||||
setlocal noswapfile bufhidden=unload buftype=nowrite undolevels=-1
|
||||
else
|
||||
set eventignore-=all relativenumber
|
||||
endif
|
||||
endfunction
|
||||
|
||||
|
||||
@ -121,7 +121,7 @@ set completeopt+=menuone " Show menu even if there is only one item
|
||||
set completeopt-=preview " Disable the preview window
|
||||
|
||||
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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user