Skip to content

Commit

Permalink
feat(nvim): replace cmp with blink
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikaverpil committed Oct 8, 2024
1 parent a7107eb commit 93699fe
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
36 changes: 36 additions & 0 deletions nvim-fredrik/lua/plugins/blink.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
return {

{
"saghen/blink.cmp",
lazy = false, -- lazy loading handled internally
-- optional: provides snippets for the snippet source
dependencies = "rafamadriz/friendly-snippets",

-- use a release tag to download pre-built binaries
version = "*",
-- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',

opts = {
highlight = {
-- sets the fallback highlight groups to nvim-cmp's highlight groups
-- useful for when your theme doesn't support blink.cmp
-- will be removed in a future release, assuming themes add support
use_nvim_cmp_as_default = true,
},
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- adjusts spacing to ensure icons are aligned
nerd_font_variant = "mono",

-- experimental auto-brackets support
-- accept = { auto_brackets = { enabled = true } }

-- experimental signature help support
trigger = { signature_help = { enabled = true } },

keymap = {
accept = "<CR>",
},
},
},
}
1 change: 1 addition & 0 deletions nvim-fredrik/lua/plugins/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ return {

{
"hrsh7th/nvim-cmp",
enabled = false,
dependencies = {
{ "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-path" },
Expand Down
8 changes: 6 additions & 2 deletions nvim-fredrik/lua/plugins/copilot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ return {
{
"zbirenbaum/copilot.lua",
dependencies = {
{ "hrsh7th/nvim-cmp" },
{
"hrsh7th/nvim-cmp",
enabled = false,
},
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
Expand Down Expand Up @@ -102,7 +105,8 @@ return {
},
config = function(_, opts)
require("CopilotChat").setup(opts)
require("CopilotChat.integrations.cmp").setup()
-- NOTE: cmp is disabled
-- require("CopilotChat.integrations.cmp").setup()
end,
keys = require("config.keymaps").setup_copilot_chat_keymaps(),
},
Expand Down
4 changes: 3 additions & 1 deletion nvim-fredrik/lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ return {
},
{
"hrsh7th/nvim-cmp",
enabled = false,
-- NOTE: this is here because we get the default client capabilities from cmp_nvim_lsp
-- see cmp.lua for more settings.
},
Expand Down Expand Up @@ -139,7 +140,8 @@ return {
-- So, we create new capabilities with nvim cmp, and then broadcast that to the servers.
local client_capabilities = vim.lsp.protocol.make_client_capabilities()
-- The nvim-cmp almost supports LSP's capabilities so you should advertise it to LSP servers..
local completion_capabilities = require("cmp_nvim_lsp").default_capabilities()
-- local completion_capabilities = require("cmp_nvim_lsp").default_capabilities()
local completion_capabilities = {} -- cmp disabled
local capabilities = vim.tbl_deep_extend("force", client_capabilities, completion_capabilities)

local supported_servers = {}
Expand Down

0 comments on commit 93699fe

Please sign in to comment.