Skip to content

Commit

Permalink
update plugin conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ucpr committed Oct 13, 2024
1 parent 8a88c96 commit 4a183ab
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 7 deletions.
1 change: 1 addition & 0 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"FTerm.nvim": { "branch": "master", "commit": "d1320892cc2ebab472935242d9d992a2c9570180" },
"aerial.nvim": { "branch": "master", "commit": "603156d4fd58963a05f221e76b1a25bc79ed55b0" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lsp-document-symbol": { "branch": "main", "commit": "f94f7ba948e32cd302caba1c2ca3f7c697fb4fcf" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
Expand Down
36 changes: 34 additions & 2 deletions nvim/lua/plugins/cmp.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
return {
"hrsh7th/nvim-cmp",
event = "InsertEnter",
event = "VimEnter",
dependencies = {
"hrsh7th/cmp-buffer", -- source for text in buffer
"hrsh7th/cmp-path", -- source for file system paths
"hrsh7th/cmp-path", -- source for file system paths
"hrsh7th/cmp-nvim-lsp-document-symbol",
"hrsh7th/cmp-nvim-lsp-signature-help",
{
Expand All @@ -18,6 +18,7 @@ return {
},
"hrsh7th/cmp-vsnip",
"onsails/lspkind.nvim", -- vs-code like pictogram
"hrsh7th/cmp-cmdline",
},
config = function()
local cmp = require("cmp")
Expand All @@ -35,6 +36,16 @@ return {


cmp.setup({
window = {
completion = cmp.config.window.bordered({
border = 'double',
winhighlight = "Normal:CmpNormal",
}),
documentation = cmp.config.window.bordered({
border = 'double',
winhighlight = "Normal:CmpDocNormal",
}),
},
snippet = {
expand = function(args)
vim.fn["vsnip#anonymous"](args.body)
Expand Down Expand Up @@ -78,6 +89,27 @@ return {
{ name = "path" },
}),
})
-- `/` cmdline setup.
cmp.setup.cmdline('/', {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = 'buffer' }
}
})
-- `:` cmdline setup.
cmp.setup.cmdline(':', {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = 'path' }
}, {
{
name = 'cmdline',
option = {
ignore_cmds = { 'Man', '!' }
}
}
})
})

vim.cmd([[
set completeopt=menuone,noinsert,noselect
Expand Down
10 changes: 5 additions & 5 deletions nvim/lua/plugins/go.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
return {
{
'kyoh86/vim-go-coverage',
ft = {'go'},
ft = { 'go' },
},
{
'mattn/vim-goaddtags',
ft = {'go'},
ft = { 'go' },
},
{
'mattn/vim-goimpl',
ft = {'go'},
ft = { 'go' },
},
{
'mattn/vim-gomod',
ft = {'go'},
ft = { 'go', 'gomod', 'gosum', 'gowork' },
},
{
'mattn/vim-goimports',
ft = {'go'},
ft = { 'go' },
config = function()
vim.g.goimports = 1
end,
Expand Down
1 change: 1 addition & 0 deletions nvim/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ return {
},
config = function()
require("telescope").setup({
file_ignore_patterns = { "node_modules/", ".git", ".cache", ".venv", ".vscode", ".idea", ".DS_Store", "vendor/" },
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
Expand Down

0 comments on commit 4a183ab

Please sign in to comment.