diff --git a/flake.lock b/flake.lock index 7ac109d0..df548415 100644 --- a/flake.lock +++ b/flake.lock @@ -2532,11 +2532,11 @@ "norg-meta": "norg-meta" }, "locked": { - "lastModified": 1760523604, - "narHash": "sha256-jI9PANPWfkAyLzMDeryPjiL7S+Y3h9YJ5qdCS2v1ozY=", + "lastModified": 1760631802, + "narHash": "sha256-S7Y99hLRow3m6V3bt65bKpuvwewUF4q5SD/Xm+ZU8+8=", "owner": "nvim-neorg", "repo": "nixpkgs-neorg-overlay", - "rev": "a5dcae3e46a59744969eb48290db0a9253d86ac9", + "rev": "e6919e67252a6ced7f97ab8a6cdd0599b94c0024", "type": "github" }, "original": { diff --git a/neovim/default.nix b/neovim/default.nix index aebfebbb..bfefb777 100644 --- a/neovim/default.nix +++ b/neovim/default.nix @@ -534,92 +534,133 @@ in { # end # ''; }; - # blink-cmp = { - # enable = false; - # settings = { - # sources = { - # cmdline = []; - # default = ["lsp" "dictionary" "snippets" "path" "buffer"]; - # providers = { - # buffer = { - # score_offset = -7; - # }; - # lsp = { - # fallbacks = []; - # }; - # path = {}; - # dictionary = { - # module = "blink-cmp-dictionary"; - # name = "Dict"; - # min_keyword_length = 3; - # opts = { - # }; - # }; - # }; - # }; - # }; - # }; - # blink-cmp-dictionary.enable = true; - # blink-cmp-git.enable = true; - # blink-cmp-copilot.enable = true; - # blink-cmp-spell.enable = true; - # blink-compat.enable = true; - cmp = { + blink-cmp = { enable = true; settings = { - autoEnableSources = true; - sources = [ - {name = "buffer";} - {name = "buffer";} - {name = "cmdline";} - {name = "cmp-clippy";} - {name = "cmp-cmdline-history";} - {name = "crates";} - {name = "dap";} - # {name = "dictionary";} - {name = "fish";} - {name = "git";} - {name = "luasnip";} - {name = "nvim_lsp";} - {name = "nvim_lua";} - {name = "nvim_lsp_signature_help";} - {name = "nvim_lsp_document_symbol";} - {name = "path";} - {name = "rg";} - {name = "spell";} - {name = "tmux";} - {name = "treesitter";} - ]; - view = { - entries = { - name = "custom"; - selection_order = "near_cursor"; - }; + completion = { + documentation.window.border = "rounded"; + menu.border = "rounded"; }; - window = { - completion = { - inherit border; - }; - documentation = { - inherit border; - }; + signature = { + window.border = "rounded"; }; - mapping = { + keymap = { # "" = "cmp.mapping.confirm({select = true})"; - "" = "cmp.mapping.confirm()"; - "" = "cmp.mapping.complete()"; - "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; - "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + # "" = "cmp.mapping.confirm()"; + # "" = "cmp.mapping.complete()"; + # "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + # "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + "" = [ + "select_next" + "fallback" + ]; + "" = [ + "select_prev" + "fallback" + ]; + # "" = [ + # "snippet_forward" + # "fallback" + # ]; + # "" = [ + # "snippet_backward" + # "fallback" + # ]; + "" = [ + "scroll_documentation_up" + "fallback" + ]; + "" = [ + "scroll_documentation_down" + "fallback" + ]; + }; + sources = { + cmdline = []; + default = ["lsp" "dictionary" "snippets" "path" "buffer"]; + providers = { + buffer = { + score_offset = -7; + }; + lsp = { + fallbacks = []; + }; + path = {}; + dictionary = { + module = "blink-cmp-dictionary"; + name = "Dict"; + min_keyword_length = 3; + opts = { + }; + }; + }; }; - snippet.expand = - # lua - '' - function(args) - require('luasnip').lsp_expand(args.body) - end - ''; }; }; + blink-cmp-dictionary.enable = true; + blink-cmp-git.enable = true; + blink-cmp-copilot.enable = true; + blink-cmp-spell.enable = true; + blink-compat = { + enable = true; + settings.impersonate_nvim_cmp = true; + }; + # cmp = { + # enable = true; + # settings = { + # autoEnableSources = true; + # sources = [ + # {name = "buffer";} + # {name = "buffer";} + # {name = "cmdline";} + # {name = "cmp-clippy";} + # {name = "cmp-cmdline-history";} + # {name = "crates";} + # {name = "dap";} + # # {name = "dictionary";} + # {name = "fish";} + # {name = "git";} + # {name = "luasnip";} + # {name = "nvim_lsp";} + # {name = "nvim_lua";} + # {name = "nvim_lsp_signature_help";} + # {name = "nvim_lsp_document_symbol";} + # {name = "path";} + # {name = "rg";} + # {name = "spell";} + # {name = "tmux";} + # {name = "treesitter";} + # ]; + # view = { + # entries = { + # name = "custom"; + # selection_order = "near_cursor"; + # }; + # }; + # window = { + # completion = { + # inherit border; + # }; + # documentation = { + # inherit border; + # }; + # }; + # mapping = { + # # "" = "cmp.mapping.confirm({select = true})"; + # "" = "cmp.mapping.confirm()"; + # "" = "cmp.mapping.complete()"; + # "" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})"; + # "" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})"; + # }; + # snippet.expand = + # # lua + # '' + # function(args) + # require('luasnip').lsp_expand(args.body) + # end + # ''; + # }; + # }; }; extraConfigLua = # lua