mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
feat: language injections
This commit is contained in:
@@ -18,10 +18,14 @@ in
|
||||
enable = true;
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-Space>" = "cmp.mapping.confirm({select = true})";
|
||||
"<C-Enter>" = "cmp.mapping.complete()";
|
||||
"<C-n>" = # lua
|
||||
"cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" = # lua
|
||||
"cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-Space>" = # lua
|
||||
"cmp.mapping.confirm({select = true})";
|
||||
"<C-Enter>" = # lua
|
||||
"cmp.mapping.complete()";
|
||||
};
|
||||
sources = [
|
||||
{ name = "path"; }
|
||||
@@ -34,7 +38,8 @@ in
|
||||
"abbr"
|
||||
"kind"
|
||||
];
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
snippet.expand = # lua
|
||||
"function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
window = {
|
||||
completion.border = "rounded";
|
||||
documentation.border = "rounded";
|
||||
|
||||
@@ -13,36 +13,38 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
extraConfigLua = ''
|
||||
require("actions-preview").setup({})
|
||||
extraConfigLua = # lua
|
||||
''
|
||||
require("actions-preview").setup({})
|
||||
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
local signs = {
|
||||
{ name = "DiagnosticSignError", text = "" },
|
||||
{ name = "DiagnosticSignWarn", text = "" },
|
||||
{ name = "DiagnosticSignHint", text = "" },
|
||||
{ name = "DiagnosticSignInfo", text = "" },
|
||||
}
|
||||
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
for _, sign in ipairs(signs) do
|
||||
vim.fn.sign_define(sign.name, { texthl = sign.name, text = sign.text, numhl = "" })
|
||||
end
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = true,
|
||||
severity_sort = false,
|
||||
})
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
||||
'';
|
||||
vim.diagnostic.config({
|
||||
virtual_text = true,
|
||||
signs = true,
|
||||
underline = true,
|
||||
update_in_insert = true,
|
||||
severity_sort = false,
|
||||
})
|
||||
vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { border = "rounded" })
|
||||
'';
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>sa";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
lua = true;
|
||||
action = "require('actions-preview').code_actions";
|
||||
action = # lua
|
||||
"require('actions-preview').code_actions";
|
||||
}
|
||||
{
|
||||
key = "<leader>sx";
|
||||
|
||||
@@ -8,11 +8,18 @@ in
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
opts.showmode = false;
|
||||
plugins = {
|
||||
notify = {
|
||||
enable = true;
|
||||
backgroundColour = "#000000";
|
||||
stages = "static";
|
||||
};
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps."<leader>n" = # vim
|
||||
"notify";
|
||||
};
|
||||
which-key.registrations."<leader>n" = "Notifications";
|
||||
lualine = {
|
||||
enable = true;
|
||||
globalstatus = true;
|
||||
|
||||
@@ -23,11 +23,12 @@ in
|
||||
filteredItems.visible = true;
|
||||
};
|
||||
popupBorderStyle = "rounded";
|
||||
eventHandlers.file_opened = ''
|
||||
function()
|
||||
require('neo-tree').close_all()
|
||||
end
|
||||
'';
|
||||
eventHandlers.file_opened = # lua
|
||||
''
|
||||
function()
|
||||
require('neo-tree').close_all()
|
||||
end
|
||||
'';
|
||||
};
|
||||
which-key.registrations."<leader>f".t = "Tree";
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user