summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2024-05-14 23:36:16 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2024-05-14 23:36:16 +0200
commit8bb781db165ebc7b8dfebc001c332fa46d7e5eae (patch)
tree4b7327d45fdd527fe09fdb8399e484de50e49370
parent08d43677ae532f3ab8a99991e6ae8070b9db38ed (diff)
Update cmp
-rw-r--r--fnl/plugins/cmp.fnl69
-rw-r--r--lazy-lock.json31
2 files changed, 38 insertions, 62 deletions
diff --git a/fnl/plugins/cmp.fnl b/fnl/plugins/cmp.fnl
index 65acb58..24beee0 100644
--- a/fnl/plugins/cmp.fnl
+++ b/fnl/plugins/cmp.fnl
@@ -1,15 +1,13 @@
;; Configuration for completion plugin.
-(local dependencies [:hrsh7th/cmp-buffer
- :onsails/lspkind-nvim
- :hrsh7th/cmp-nvim-lsp
+(local dependencies [:L3MON4D3/LuaSnip
+ :f3fora/cmp-spell
+ :hrsh7th/cmp-buffer
:hrsh7th/cmp-cmdline
- :petertriho/cmp-git
- :L3MON4D3/LuaSnip
- :rafamadriz/friendly-snippets
:hrsh7th/cmp-path
- :saadparwaiz1/cmp_luasnip
- :f3fora/cmp-spell])
+ :onsails/lspkind.nvim
+ :rafamadriz/friendly-snippets
+ :saadparwaiz1/cmp_luasnip])
(fn config []
(let [cmp (require :cmp)
@@ -21,20 +19,12 @@
(cmp.setup {:snippet {:expand (fn [args]
(luasnip.lsp_expand args.body))}
:completion {:completopt "menu,menuone,noinsert"}
- :mapping (cmp.mapping.preset.insert {:<c-k> (cmp.mapping.select_prev_item)
- :<c-j> (cmp.mapping.select_next_item)
- :<c-b> (cmp.mapping (cmp.mapping.scroll_docs -1)
- [:i
- :c])
- :<c-f> (cmp.mapping (cmp.mapping.scroll_docs 1)
- [:i
- :c])
- :<c-space> (cmp.mapping (cmp.mapping.complete)
- [:i
- :c])
- :<c-e> (cmp.mapping {:i (cmp.mapping.abort)
- :c (cmp.mapping.close)})
- :<c-y> (cmp.mapping.confirm {:select true})})
+ :mapping (cmp.mapping.preset.insert {:<c-k> (cmp.mapping.select_prev_item {:behavior cmp.SelectBehavior.Insert})
+ :<c-j> (cmp.mapping.select_next_item {:behavior cmp.SelectBehavior.Insert})
+ :<c-y> (cmp.mapping (cmp.mapping.confirm {:behavior cmp.SelectBehavior.Insert
+ :select true}
+ [:i
+ :c]))})
:sources [{:name :nvim_lsp
:group_index 1
:keyword_length 3
@@ -43,33 +33,20 @@
{:name :spell :group_index 3}
{:name :nvim_lua}
{:name :luasnip}
- {:name :orgmode}
- {:name :neorg}
- {:name :path :keyword_length 6}
- {:name :vim-dadbod-completion}
- {:name :git}]
- :formatting {:format (lspkind.cmp_format {:with_text true
- :menu {:buffer ""
- :nvim_lsp ""
- :nvim_lua ""
- :path ""
- :luasnip ""}})}
- :window {:documentation {:border ["╭"
- "─"
- "╮"
- "│"
- "╯"
- "─"
- "╰"
- "│"]}
- :completion {:scrollbar false}}
- :confirm_opts {:behavior cmp.ConfirmBehavior.Replace
- :select false}
+ {:name :path :keyword_length 6}]
:performance {:debounce 200
:throttle 250
:fetching_timeout 80
- :max_view_entries 16}
- :experimental {:ghost_text false :native_menu false}})
+ :max_view_entries 16}})
+ (cmp.setup.filetype [:org :orgagenda]
+ {:sources [{:name :orgmode :group_index 1}
+ {:name :buffer :group_index 2}
+ {:name :spell :group_index 3}]})
+ (cmp.setup.filetype [:sql]
+ {:sources [{:name :vim-dadbod-completion
+ :group_index 1}
+ {:name :buffer :group_index 2}
+ {:name :spell :group_index 3}]})
(cmp.setup.cmdline "/"
{:mapping (cmp.mapping.preset.cmdline)
:sources [{:name :buffer}]})
diff --git a/lazy-lock.json b/lazy-lock.json
index 8c3b96d..3fc2f63 100644
--- a/lazy-lock.json
+++ b/lazy-lock.json
@@ -1,10 +1,9 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
- "LuaSnip": { "branch": "master", "commit": "b152822e1a4bafb6bdf11a16cc26525cbd95ee00" },
+ "LuaSnip": { "branch": "master", "commit": "7b1dda0dfdefc10b2501295eba5e463dbd7c338f" },
"alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
- "cmp-git": { "branch": "main", "commit": "b9603f18496bc3ca07e6bd474607081af709e750" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" },
@@ -20,16 +19,16 @@
"gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" },
"harpoon": { "branch": "harpoon2", "commit": "0378a6c428a0bed6a2781d459d7943843f374bce" },
"hotpot.nvim": { "branch": "master", "commit": "5c96b423a6663c91c47d6184f810acf1dacf4615" },
- "inc-rename.nvim": { "branch": "main", "commit": "1d7d3f647d0928614c00ca9ef4ce695c45147c05" },
+ "inc-rename.nvim": { "branch": "main", "commit": "7c6125b1ee476b56708a6518a37b2a3357f57bfc" },
"lazy.nvim": { "branch": "main", "commit": "e44636a43376e8a1e851958f7e9cbe996751d59f" },
"leap-spooky.nvim": { "branch": "main", "commit": "5f44a1f63dc1c4ce50244e92da5bc0d8d1f6eb47" },
- "leap.nvim": { "branch": "main", "commit": "be68eec21e37415d15cffaabc959b8d3f9466665" },
- "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
+ "leap.nvim": { "branch": "main", "commit": "b1ecfb63c0b8babfd0dcd6b5ca6de37bbf3526cd" },
+ "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine-lsp-progress": { "branch": "master", "commit": "56842d097245a08d77912edf5f2a69ba29f275d7" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"luarocks.nvim": { "branch": "main", "commit": "d3dda396d66e484590f253d1ac6d8980e3130807" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" },
- "mason.nvim": { "branch": "main", "commit": "1b3d60405d1d720b2c4927f19672e9479703b00f" },
+ "mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"neogit": { "branch": "master", "commit": "bc0c609e3568a171e0549b449aa1b2b4b5b20e8c" },
"no-clown-fiesta.nvim": { "branch": "master", "commit": "0cf858e14aa98218c4aec92011bded80e935549b" },
"nvim-bqf": { "branch": "main", "commit": "7751b6ef9fbc3907478eaf23e866c4316a2ed1b4" },
@@ -37,35 +36,35 @@
"nvim-cmp": { "branch": "main", "commit": "24122371810089d390847d8ba66325c1f1aa64c0" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-lint": { "branch": "master", "commit": "f3bcc28ffccb768212247294acccc106e029fc3c" },
- "nvim-lspconfig": { "branch": "master", "commit": "94513a5b246cf32a8f87ca714af50911df63351c" },
+ "nvim-lspconfig": { "branch": "master", "commit": "a27179f56c6f98a4cdcc79ee2971b514815a4940" },
"nvim-spectre": { "branch": "master", "commit": "4651801ba37a9407b7257287aec45b6653ffc5e9" },
"nvim-surround": { "branch": "main", "commit": "6d0dc3dbb557bcc6a024969da461df4ba803fc48" },
- "nvim-treesitter": { "branch": "master", "commit": "d5a1c2b0c8ec5bb377a41c1c414b315d6b3e9432" },
- "nvim-treesitter-textobjects": { "branch": "master", "commit": "dfa4178c0cadb44f687603d72ad0908474c28dd9" },
+ "nvim-treesitter": { "branch": "master", "commit": "c26cfc75bc77b3538f4f288b013bc927a371bf2e" },
+ "nvim-treesitter-textobjects": { "branch": "master", "commit": "e231525a7ff4fd9ba2f5400c52b4cdaa8b2587f4" },
"nvim-various-textobjs": { "branch": "main", "commit": "674b7c97f2b50ac8b8876202622e52395cfdfe02" },
- "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" },
+ "nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" },
"nvim-window-picker": { "branch": "main", "commit": "2c8200c5cbcdaac01dfe2c049997a1ca178506d8" },
- "oil.nvim": { "branch": "master", "commit": "aa0c00c7fd51982ac476d165cd021f348cf5ea71" },
+ "oil.nvim": { "branch": "master", "commit": "3283deec96314326faed1d3a94ce142ae9773d8b" },
"org-bullets.nvim": { "branch": "main", "commit": "3623e86e0fa6d07f45042f7207fc333c014bf167" },
- "org-roam.nvim": { "branch": "main", "commit": "ae59d6b9ad848c8a8220df461a336f938e10b329" },
- "orgmode": { "branch": "master", "commit": "cda615fa7c8607bfb7aaf7d2c9424dd5969f2625" },
+ "org-roam.nvim": { "branch": "main", "commit": "295fa650e157f52586473a763510f860323adeb9" },
+ "orgmode": { "branch": "master", "commit": "8ec0bcc6f6476d246159f738081256c97a7a9b2c" },
"persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"rest.nvim": { "branch": "main", "commit": "f96edb54a2940322bc7ed81a1031be04db7d3a99" },
- "schemastore.nvim": { "branch": "main", "commit": "8706b99e1253f54f640fbc4f4ae13cdf034c135a" },
+ "schemastore.nvim": { "branch": "main", "commit": "3c32d6a7bc56d56d4e3cc16fb21b59465a527aeb" },
"sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" },
"stay-in-place.nvim": { "branch": "main", "commit": "0628b6db8970fc731abf9608d6f80659b58932c9" },
"telescope-frecency.nvim": { "branch": "master", "commit": "6b6565e6584c86ca501bdac485cbdc2ca64556e4" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
"telescope-orgmode.nvim": { "branch": "main", "commit": "d70432192deb51d61aba253688b057d51a5d9ac4" },
- "telescope.nvim": { "branch": "master", "commit": "02a60a83961cf9c80e471599171982a31d1cc853" },
+ "telescope.nvim": { "branch": "master", "commit": "6f6bb8065567b56c42e283b06e8a1c670c0092a1" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-dadbod": { "branch": "master", "commit": "37523ffe0849b51db07fa7f48430c2aca5420a0e" },
"vim-dadbod-completion": { "branch": "master", "commit": "c920cb0ba3dff4b1b0ed373e1c0b3007dec696c2" },
- "vim-dadbod-ui": { "branch": "master", "commit": "b1675d1f56c12b0abac2ef74b94670fe27adcf93" },
+ "vim-dadbod-ui": { "branch": "master", "commit": "23ed6edb60dcef9b30b741ca4b00ac4637da7d69" },
"vim-dotenv": { "branch": "master", "commit": "5c51cfcf8d87280d6414e03cd6b253eb70ecb800" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }