summaryrefslogtreecommitdiff
path: root/lua/tjk/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lua/tjk/plugins')
-rw-r--r--lua/tjk/plugins/cmp.lua37
-rw-r--r--lua/tjk/plugins/lsp.lua4
2 files changed, 12 insertions, 29 deletions
diff --git a/lua/tjk/plugins/cmp.lua b/lua/tjk/plugins/cmp.lua
index 346e006..3ea4026 100644
--- a/lua/tjk/plugins/cmp.lua
+++ b/lua/tjk/plugins/cmp.lua
@@ -1,30 +1,13 @@
return {
- "hrsh7th/nvim-cmp",
- dependencies = {
- "hrsh7th/cmp-path",
- "hrsh7th/cmp-nvim-lsp",
- "hrsh7th/cmp-buffer",
- "ray-x/cmp-treesitter",
+ "saghen/blink.cmp",
+ opts = {
+ keymap = {
+ preset = "super-tab",
+
+ ["<C-k>"] = { "select_prev", "fallback" },
+ ["<C-j>"] = { "select_next", "fallback" },
+ },
+
+ cmdline = { enabled = false },
},
- config = function()
- local cmp = require("cmp")
- cmp.setup {
- sources = {
- { name = "path" },
- { name = "lsp" },
- { name = "buffer" },
- { name = "treesitter" },
- },
- mapping = cmp.mapping.preset.insert {
- --['<C-b>'] = cmp.mapping.scroll_docs(-4),
- --['<C-f>'] = cmp.mapping.scroll_docs(4),
- --['<C-Space>'] = cmp.mapping.complete(),
- --['<C-e>'] = cmp.mapping.abort(),
- --['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- ["<C-j>"] = cmp.mapping.select_next_item { behavior = cmp.SelectBehavior.Insert },
- ["<C-k>"] = cmp.mapping.select_prev_item { behavior = cmp.SelectBehavior.Insert },
- ['<Tab>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
- },
- }
- end
}
diff --git a/lua/tjk/plugins/lsp.lua b/lua/tjk/plugins/lsp.lua
index a23f7ef..5a73721 100644
--- a/lua/tjk/plugins/lsp.lua
+++ b/lua/tjk/plugins/lsp.lua
@@ -1,9 +1,9 @@
return {
"neovim/nvim-lspconfig",
- enabled = false,
dependencies = {
"williamboman/mason.nvim", -- install lsp's
"williamboman/mason-lspconfig.nvim",
+ "saghen/blink.cmp", -- to ensure lspconfig can get completion capabilities
},
config = function()
require("mason").setup()
@@ -11,7 +11,7 @@ return {
local lspconfig = require("lspconfig")
lspconfig.pylsp.setup {
autostart = false,
- capabilities = require("cmp_nvim_lsp").default_capabilities()
+ capabilities = require("blink.cmp").get_lsp_capabilities()
}
end
}