(WIP) add cmp
This commit is contained in:
parent
a90705cedc
commit
51079edbd5
2 changed files with 37 additions and 1 deletions
36
plugins/cmp.nix
Normal file
36
plugins/cmp.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
_:
|
||||||
|
{
|
||||||
|
opts = {
|
||||||
|
enable = true;
|
||||||
|
autoEnableSources = true;
|
||||||
|
settings = {
|
||||||
|
snippet.expand = ''function(args) require("luasnip").lsp_expand(args.body) end'';
|
||||||
|
|
||||||
|
sources = [
|
||||||
|
{ name = "nvim_lsp"; priority = 1000; }
|
||||||
|
{ name = "path"; priority = 250; }
|
||||||
|
{ name = "buffer"; priority = 500; group_index = 2; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# TODO: add this at luasnip:
|
||||||
|
# { name = "luasnip", priority = 750 }
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
rootOpts = {
|
||||||
|
keymaps = [
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>uc";
|
||||||
|
action.__raw = ''require("astrocore.toggles").buffer_cmp'';
|
||||||
|
options.desc = "Toggle autocompletion (buffer)";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
mode = "n";
|
||||||
|
key = "<leader>uC";
|
||||||
|
action.__raw = ''require("astrocore.toggles").cmp'';
|
||||||
|
options.desc = "Toggle autocompletion (global)";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
rootOpts.keymaps = [
|
rootOpts.keymaps = [
|
||||||
{
|
{
|
||||||
mode = "n";
|
mode = "n";
|
||||||
key = "<leader>uc";
|
key = "<leader>uP";
|
||||||
action.__raw = ''
|
action.__raw = ''
|
||||||
function()
|
function()
|
||||||
local visible = require("precognition").toggle()
|
local visible = require("precognition").toggle()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue