Skip to content

Commit

Permalink
win
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Dec 26, 2024
1 parent 7722c0d commit 1c79046
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 38 deletions.
73 changes: 36 additions & 37 deletions lua/plugins/completion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ return {
-- optional: provides snippets for the snippet source
dependencies = {
{ 'rafamadriz/friendly-snippets' },
{ 'moyiz/blink-emoji.nvim' },
{
'saghen/blink.compat',
dev = false,
Expand All @@ -28,60 +29,59 @@ return {
dev = false,
ft = { 'quarto', 'markdown', 'rmarkdown' },
},
{ 'hrsh7th/cmp-emoji' },
{ 'kdheepak/cmp-latex-symbols' },
},

-- use a release tag to download pre-built binaries
version = 'v0.*',
-- OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
-- build = 'cargo build --release',
-- If you use nix, you can build from source using latest nightly rust with:
-- build = 'nix run .#build-plugin',

---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
-- 'default' for mappings similar to built-in completion
-- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
-- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
-- see the "default configuration" section below for full documentation on how to define
-- your own keymap.
keymap = { preset = 'enter' },

sources = {
completion = {
enabled_providers = { "lsp", "path", "snippets", "buffer", "lazydev" },
default = { "lazydev", "lsp", "path", "snippets", "buffer", "emoji" },
cmdline = {
enabled = false,
},
providers = {
-- dont show LuaLS require statements when lazydev has items
lsp = { fallback_for = { "lazydev" } },
lazydev = { name = "LazyDev", module = "lazydev.integrations.blink" },
-- references = {
-- name = "pandoc_references",
-- module = "blink.compat.source",
-- },
emoji = { name = "emoji", module = "blink.compat.source" },
emoji = {
module = "blink-emoji",
name = "Emoji",
score_offset = 15, -- Tune by preference
},
lazydev = {
name = "LazyDev",
module = "lazydev.integrations.blink",
-- make lazydev completions top priority (see `:h blink.cmp`)
score_offset = 100,
},
references = {
name = "pandoc_references",
module = "blink.compat.source",
},
symbols = { name = "symbols", module = "blink.compat.source" },
},
},

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
appearance = {
-- 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
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'
},
-- 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 } },
}
completion = {
documentation = {
auto_show = true,
auto_show_delay_ms = 500,
treesitter_highlighting = true,
},
menu = { auto_show = function(ctx) return ctx.mode ~= 'cmdline' end },
},
signature = { enabled = true }
},
},

{ -- completion
Expand All @@ -90,7 +90,6 @@ return {
event = 'InsertEnter',
dependencies = {
'hrsh7th/cmp-nvim-lsp',
-- TODO: wait for PR merge to revert back to hrsh7th upstream
'jmbuhr/cmp-nvim-lsp-signature-help',
'hrsh7th/cmp-buffer',
'hrsh7th/cmp-path',
Expand Down
2 changes: 1 addition & 1 deletion lua/plugins/quarto.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return {
-- for complete functionality (language features)
'quarto-dev/quarto-nvim',
ft = { 'quarto' },
dev = true,
dev = false,
opts = {
codeRunner = {
enabled = true,
Expand Down

0 comments on commit 1c79046

Please sign in to comment.