mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Compare commits
3 Commits
95d3b2f2d8
...
a3c8b3d5b5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3c8b3d5b5 | ||
|
|
d150f39afc | ||
|
|
3904cd4ccf |
@ -35,7 +35,6 @@ 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,
|
||||
@ -50,12 +49,14 @@ 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,7 +32,6 @@ local plugin_specs = {
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-omni",
|
||||
"hrsh7th/cmp-emoji",
|
||||
"quangnguyen30192/cmp-nvim-ultisnips",
|
||||
},
|
||||
config = function()
|
||||
@ -126,6 +125,15 @@ 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",
|
||||
@ -546,6 +554,26 @@ 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,16 +101,14 @@ augroup END
|
||||
|
||||
" ref: https://vi.stackexchange.com/a/169/15292
|
||||
function! s:handle_large_file() abort
|
||||
let g:large_file = 10485760 " 10MB
|
||||
let g:file_size_limit = 524288 " 0.5MB
|
||||
let f = expand("<afile>")
|
||||
|
||||
if getfsize(f) > g:large_file || getfsize(f) == -2
|
||||
set eventignore+=all
|
||||
if getfsize(f) > g:file_size_limit || getfsize(f) == -2
|
||||
setlocal eventignore=all
|
||||
" turning off relative number helps a lot
|
||||
set norelativenumber
|
||||
setlocal noswapfile bufhidden=unload buftype=nowrite undolevels=-1
|
||||
else
|
||||
set eventignore-=all relativenumber
|
||||
setlocal norelativenumber
|
||||
setlocal noswapfile bufhidden=unload undolevels=-1
|
||||
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=10 " pseudo transparency for completion menu
|
||||
set pumblend=5 " pseudo transparency for completion menu
|
||||
|
||||
set winblend=0 " pseudo transparency for floating window
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user