358 current 2024-04-16 14:38:00 24.05.20240416.c04952a 6.8.4-zen1 *
This commit is contained in:
parent
76e98d422e
commit
38c95e923d
47 changed files with 1991 additions and 1876 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
use flake;
|
||||||
16
flake.lock
generated
16
flake.lock
generated
|
|
@ -557,6 +557,7 @@
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"rio-term": "rio-term",
|
"rio-term": "rio-term",
|
||||||
|
"systems": "systems_6",
|
||||||
"waybar": "waybar"
|
"waybar": "waybar"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -674,6 +675,21 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"systems_6": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"waybar": {
|
"waybar": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
|
|
|
||||||
18
flake.nix
18
flake.nix
|
|
@ -48,11 +48,14 @@
|
||||||
rio-term = {
|
rio-term = {
|
||||||
url = "github:zackartz/rio";
|
url = "github:zackartz/rio";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
|
systems,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
@ -60,6 +63,11 @@
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.neovim-nightly-overlay.overlay
|
inputs.neovim-nightly-overlay.overlay
|
||||||
];
|
];
|
||||||
|
eachSystem = f:
|
||||||
|
nixpkgs.lib.genAttrs (import systems) (
|
||||||
|
system:
|
||||||
|
f nixpkgs.legacyPackages.${system}
|
||||||
|
);
|
||||||
in {
|
in {
|
||||||
nixosConfigurations.earth = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.earth = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
|
|
@ -68,5 +76,15 @@
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
devShells = eachSystem (pkgs: {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.nil
|
||||||
|
pkgs.stylua
|
||||||
|
pkgs.nodePackages.coc-sumneko-lua
|
||||||
|
];
|
||||||
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,8 @@ return {
|
||||||
[l("uI")] = { f.set_indent_type, fmt("Indent", "Set indentation type") },
|
[l("uI")] = { f.set_indent_type, fmt("Indent", "Set indentation type") },
|
||||||
[l("us")] = { cmd("nohlsearch"), fmt("Clear", "Clear search highlights") },
|
[l("us")] = { cmd("nohlsearch"), fmt("Clear", "Clear search highlights") },
|
||||||
|
|
||||||
|
["<C-F12>"] = { cmd("OverseerRun"), "Overseer Run" },
|
||||||
["<F36>"] = { cmd("OverseerRun"), "Overseer Run" },
|
["<C-S-F12>"] = { cmd("OverseerToggle"), "Overseer Toggle" },
|
||||||
["<F48>"] = { cmd("OverseerToggle"), "Overseer Toggle" },
|
|
||||||
-- Neotree
|
-- Neotree
|
||||||
[l("e")] = { cmd("Neotree toggle"), fmt("FileTree", "Toggle Neotree") },
|
[l("e")] = { cmd("Neotree toggle"), fmt("FileTree", "Toggle Neotree") },
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,41 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.definitions = function() vim.cmd("Telescope lsp_definitions") end
|
M.definitions = function()
|
||||||
M.type_definition = function() vim.lsp.buf.type_definition() end
|
vim.cmd("Telescope lsp_definitions")
|
||||||
M.declarations = function() vim.lsp.buf.declaration() end
|
end
|
||||||
M.implementations = function() vim.cmd("Telescope lsp_implementations") end
|
M.type_definition = function()
|
||||||
M.references = function() vim.cmd("Telescope lsp_references") end
|
vim.lsp.buf.type_definition()
|
||||||
M.hover = function() vim.lsp.buf.hover() end
|
end
|
||||||
M.rename = function() vim.lsp.buf.rename() end
|
M.declarations = function()
|
||||||
M.signature_help = function() vim.lsp.buf.signature_help() end
|
vim.lsp.buf.declaration()
|
||||||
M.symbols = function() vim.cmd("Telescope lsp_workspace_symbols") end
|
end
|
||||||
M.refresh_codelens = function() vim.lsp.codelens.refresh() end
|
M.implementations = function()
|
||||||
M.run_codelens = function() vim.lsp.codelens.run() end
|
vim.cmd("Telescope lsp_implementations")
|
||||||
M.toggle_inlay_hint = function() vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled(0)) end
|
end
|
||||||
|
M.references = function()
|
||||||
|
vim.cmd("Telescope lsp_references")
|
||||||
|
end
|
||||||
|
M.hover = function()
|
||||||
|
vim.lsp.buf.hover()
|
||||||
|
end
|
||||||
|
M.rename = function()
|
||||||
|
vim.lsp.buf.rename()
|
||||||
|
end
|
||||||
|
M.signature_help = function()
|
||||||
|
vim.lsp.buf.signature_help()
|
||||||
|
end
|
||||||
|
M.symbols = function()
|
||||||
|
vim.cmd("Telescope lsp_workspace_symbols")
|
||||||
|
end
|
||||||
|
M.refresh_codelens = function()
|
||||||
|
vim.lsp.codelens.refresh()
|
||||||
|
end
|
||||||
|
M.run_codelens = function()
|
||||||
|
vim.lsp.codelens.run()
|
||||||
|
end
|
||||||
|
M.toggle_inlay_hint = function()
|
||||||
|
vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled(0))
|
||||||
|
end
|
||||||
|
|
||||||
M.diagnostics = function()
|
M.diagnostics = function()
|
||||||
local _, win = vim.diagnostic.open_float()
|
local _, win = vim.diagnostic.open_float()
|
||||||
|
|
@ -20,8 +44,12 @@ M.diagnostics = function()
|
||||||
vim.wo[win].signcolumn = "yes:1"
|
vim.wo[win].signcolumn = "yes:1"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
M.next_diagnostic = function() vim.diagnostic.goto_next() end
|
M.next_diagnostic = function()
|
||||||
M.prev_diagnostic = function() vim.diagnostic.goto_prev() end
|
vim.diagnostic.goto_next()
|
||||||
|
end
|
||||||
|
M.prev_diagnostic = function()
|
||||||
|
vim.diagnostic.goto_prev()
|
||||||
|
end
|
||||||
|
|
||||||
M.format = function()
|
M.format = function()
|
||||||
vim.api.nvim_create_autocmd("TextChanged", {
|
vim.api.nvim_create_autocmd("TextChanged", {
|
||||||
|
|
@ -35,7 +63,9 @@ M.format = function()
|
||||||
})
|
})
|
||||||
vim.lsp.buf.format({
|
vim.lsp.buf.format({
|
||||||
async = true,
|
async = true,
|
||||||
filter = function(client) return client.name == "null-ls" end,
|
filter = function(client)
|
||||||
|
return client.name == "null-ls"
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,15 @@ local make_config = function(name, config)
|
||||||
capabilities.textDocument.colorProvider = { dynamicRegistration = true }
|
capabilities.textDocument.colorProvider = { dynamicRegistration = true }
|
||||||
local extended_config = vim.tbl_extend("error", { capabilities = capabilities }, config)
|
local extended_config = vim.tbl_extend("error", { capabilities = capabilities }, config)
|
||||||
|
|
||||||
return function() require("lspconfig")[name].setup(extended_config) end
|
return function()
|
||||||
|
require("lspconfig")[name].setup(extended_config)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Default handler
|
-- Default handler
|
||||||
M[1] = function(server_name) make_config(server_name, {})() end
|
M[1] = function(server_name)
|
||||||
|
make_config(server_name, {})()
|
||||||
|
end
|
||||||
|
|
||||||
M.lua_ls = make_config("lua_ls", {
|
M.lua_ls = make_config("lua_ls", {
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,9 @@ return {
|
||||||
{ "ys", mode = { "n" }, desc = "Add surrounding pair" },
|
{ "ys", mode = { "n" }, desc = "Add surrounding pair" },
|
||||||
{ "S", mode = { "v" }, desc = "Add surrounding pair" },
|
{ "S", mode = { "v" }, desc = "Add surrounding pair" },
|
||||||
},
|
},
|
||||||
config = function() require("nvim-surround").setup() end,
|
config = function()
|
||||||
|
require("nvim-surround").setup()
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -70,7 +72,9 @@ return {
|
||||||
event = { "BufReadPost", "BufNewFile" },
|
event = { "BufReadPost", "BufNewFile" },
|
||||||
dependencies = { "kevinhwang91/promise-async" },
|
dependencies = { "kevinhwang91/promise-async" },
|
||||||
opts = {
|
opts = {
|
||||||
provider_selector = function() return { "treesitter", "indent" } end,
|
provider_selector = function()
|
||||||
|
return { "treesitter", "indent" }
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,9 @@ return {
|
||||||
dependencies = { "rafamadriz/friendly-snippets" },
|
dependencies = { "rafamadriz/friendly-snippets" },
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
build = "make install_jsregexp",
|
build = "make install_jsregexp",
|
||||||
config = function() require("luasnip.loaders.from_vscode").lazy_load() end,
|
config = function()
|
||||||
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -39,7 +41,9 @@ return {
|
||||||
local lspkind_status_ok, lspkind = pcall(require, "lspkind")
|
local lspkind_status_ok, lspkind = pcall(require, "lspkind")
|
||||||
local snip_status_ok, luasnip = pcall(require, "luasnip")
|
local snip_status_ok, luasnip = pcall(require, "luasnip")
|
||||||
|
|
||||||
if not snip_status_ok then return end
|
if not snip_status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local win_conf = cmp.config.window.bordered({
|
local win_conf = cmp.config.window.bordered({
|
||||||
winhighlight = "FloatBorder:FloatBorder",
|
winhighlight = "FloatBorder:FloatBorder",
|
||||||
|
|
@ -48,7 +52,9 @@ return {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
snippet = {
|
snippet = {
|
||||||
expand = function(args) luasnip.lsp_expand(args.body) end,
|
expand = function(args)
|
||||||
|
luasnip.lsp_expand(args.body)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = win_conf,
|
completion = win_conf,
|
||||||
|
|
@ -95,8 +101,7 @@ return {
|
||||||
end, { "i", "s" }),
|
end, { "i", "s" }),
|
||||||
},
|
},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspkind_status_ok
|
format = lspkind_status_ok and lspkind.cmp_format({
|
||||||
and lspkind.cmp_format({
|
|
||||||
mode = "symbol",
|
mode = "symbol",
|
||||||
maxwidth = 25,
|
maxwidth = 25,
|
||||||
ellipsis_char = "...",
|
ellipsis_char = "...",
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,9 @@ return {
|
||||||
opts = {
|
opts = {
|
||||||
highlight = {
|
highlight = {
|
||||||
enable = true,
|
enable = true,
|
||||||
disable = function(_, bufnr) return vim.api.nvim_buf_line_count(bufnr) > 10000 end,
|
disable = function(_, bufnr)
|
||||||
|
return vim.api.nvim_buf_line_count(bufnr) > 10000
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
incremental_selection = { enable = true },
|
incremental_selection = { enable = true },
|
||||||
indent = { enable = true },
|
indent = { enable = true },
|
||||||
|
|
@ -60,6 +62,8 @@ return {
|
||||||
"ebnf",
|
"ebnf",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts) require("nvim-treesitter.configs").setup(opts) end,
|
config = function(_, opts)
|
||||||
|
require("nvim-treesitter.configs").setup(opts)
|
||||||
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
return {
|
return {
|
||||||
'stevearc/overseer.nvim',
|
"stevearc/overseer.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
task_list = {
|
task_list = {
|
||||||
direction = "bottom",
|
direction = "bottom",
|
||||||
|
|
@ -7,8 +7,8 @@ task_list = {
|
||||||
},
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
{
|
{
|
||||||
'stevearc/dressing.nvim',
|
"stevearc/dressing.nvim",
|
||||||
opts = {},
|
opts = {},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ return {
|
||||||
"CccHighlighterToggle",
|
"CccHighlighterToggle",
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
alpha_show = "show"
|
alpha_show = "show",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,7 @@ return {
|
||||||
dashboard.button("n", format("NewFile", "New file", 2), ":ene <BAR> startinsert <CR>"),
|
dashboard.button("n", format("NewFile", "New file", 2), ":ene <BAR> startinsert <CR>"),
|
||||||
dashboard.button("f", format("Search", "Find file", 2), ":Telescope find_files<CR>"),
|
dashboard.button("f", format("Search", "Find file", 2), ":Telescope find_files<CR>"),
|
||||||
dashboard.button("l", format("History", "Recents", 2), ":SessionManager load_session<CR>"),
|
dashboard.button("l", format("History", "Recents", 2), ":SessionManager load_session<CR>"),
|
||||||
dashboard.button(
|
dashboard.button("L", format("FolderOpened", "Last session", 2), ":SessionManager load_last_session<CR>"),
|
||||||
"L",
|
|
||||||
format("FolderOpened", "Last session", 2),
|
|
||||||
":SessionManager load_last_session<CR>"
|
|
||||||
),
|
|
||||||
dashboard.button("q", format("Exit", "Quit", 2), ":qa<CR>"),
|
dashboard.button("q", format("Exit", "Quit", 2), ":qa<CR>"),
|
||||||
}
|
}
|
||||||
dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) })
|
dashboard.config.layout[1].val = vim.fn.max({ 2, vim.fn.floor(vim.fn.winheight(0) * 0.2) })
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,9 @@ return {
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
lazy = false,
|
lazy = false,
|
||||||
priority = 1000,
|
priority = 1000,
|
||||||
init = function() vim.cmd.colorscheme("tokyonight-night") end,
|
init = function()
|
||||||
|
vim.cmd.colorscheme("tokyonight-night")
|
||||||
|
end,
|
||||||
opts = {
|
opts = {
|
||||||
styles = {
|
styles = {
|
||||||
keywords = { italic = false },
|
keywords = { italic = false },
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,9 @@ M.indentation = {
|
||||||
|
|
||||||
M.progress = {
|
M.progress = {
|
||||||
"progress",
|
"progress",
|
||||||
fmt = function(location) return vim.trim(location) end,
|
fmt = function(location)
|
||||||
|
return vim.trim(location)
|
||||||
|
end,
|
||||||
color = function()
|
color = function()
|
||||||
local colors = require("tokyonight.colors")
|
local colors = require("tokyonight.colors")
|
||||||
return { fg = colors.default.purple, bg = colors.night.bg }
|
return { fg = colors.default.purple, bg = colors.night.bg }
|
||||||
|
|
@ -113,7 +115,9 @@ M.progress = {
|
||||||
|
|
||||||
M.location = {
|
M.location = {
|
||||||
"location",
|
"location",
|
||||||
fmt = function(location) return vim.trim(location) end,
|
fmt = function(location)
|
||||||
|
return vim.trim(location)
|
||||||
|
end,
|
||||||
color = function()
|
color = function()
|
||||||
local colors = require("tokyonight.colors")
|
local colors = require("tokyonight.colors")
|
||||||
return { fg = colors.default.purple, bg = colors.night.bg }
|
return { fg = colors.default.purple, bg = colors.night.bg }
|
||||||
|
|
@ -121,7 +125,9 @@ M.location = {
|
||||||
}
|
}
|
||||||
|
|
||||||
M.macro = {
|
M.macro = {
|
||||||
function() return vim.fn.reg_recording() end,
|
function()
|
||||||
|
return vim.fn.reg_recording()
|
||||||
|
end,
|
||||||
icon = icons.Recording,
|
icon = icons.Recording,
|
||||||
color = function()
|
color = function()
|
||||||
local colors = require("tokyonight.colors")
|
local colors = require("tokyonight.colors")
|
||||||
|
|
@ -133,8 +139,12 @@ M.lsp = {
|
||||||
function()
|
function()
|
||||||
local bufnr = vim.api.nvim_get_current_buf()
|
local bufnr = vim.api.nvim_get_current_buf()
|
||||||
local clients = vim.lsp.get_clients({ bufnr = bufnr })
|
local clients = vim.lsp.get_clients({ bufnr = bufnr })
|
||||||
if next(clients) == nil then return "" end
|
if next(clients) == nil then
|
||||||
local attached_clients = vim.tbl_map(function(client) return client.name end, clients)
|
return ""
|
||||||
|
end
|
||||||
|
local attached_clients = vim.tbl_map(function(client)
|
||||||
|
return client.name
|
||||||
|
end, clients)
|
||||||
return table.concat(attached_clients, ", ")
|
return table.concat(attached_clients, ", ")
|
||||||
end,
|
end,
|
||||||
icon = icons.Braces,
|
icon = icons.Braces,
|
||||||
|
|
@ -145,7 +155,9 @@ M.lsp = {
|
||||||
}
|
}
|
||||||
|
|
||||||
M.gap = {
|
M.gap = {
|
||||||
function() return " " end,
|
function()
|
||||||
|
return " "
|
||||||
|
end,
|
||||||
color = function()
|
color = function()
|
||||||
local colors = require("tokyonight.colors")
|
local colors = require("tokyonight.colors")
|
||||||
return { bg = colors.night.bg }
|
return { bg = colors.night.bg }
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,18 @@ local M = {}
|
||||||
|
|
||||||
local input = function(prompt, callback)
|
local input = function(prompt, callback)
|
||||||
local value = vim.fn.input(prompt)
|
local value = vim.fn.input(prompt)
|
||||||
if value:len() ~= 0 then callback(value) end
|
if value:len() ~= 0 then
|
||||||
|
callback(value)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local select = function(prompt, callback)
|
local select = function(prompt, callback)
|
||||||
vim.ui.select({ "tabs", "spaces" }, {
|
vim.ui.select({ "tabs", "spaces" }, {
|
||||||
prompt = prompt,
|
prompt = prompt,
|
||||||
}, function(choice)
|
}, function(choice)
|
||||||
if choice then callback(choice) end
|
if choice then
|
||||||
|
callback(choice)
|
||||||
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -60,8 +64,12 @@ M.comment_selection = function()
|
||||||
require("Comment.api").toggle.linewise(vim.fn.visualmode())
|
require("Comment.api").toggle.linewise(vim.fn.visualmode())
|
||||||
end
|
end
|
||||||
|
|
||||||
M.first_buffer = function() require("bufferline").go_to(1) end
|
M.first_buffer = function()
|
||||||
M.last_buffer = function() require("bufferline").go_to(-1) end
|
require("bufferline").go_to(1)
|
||||||
|
end
|
||||||
|
M.last_buffer = function()
|
||||||
|
require("bufferline").go_to(-1)
|
||||||
|
end
|
||||||
|
|
||||||
M.buf_hsplit = function()
|
M.buf_hsplit = function()
|
||||||
require("bufferline.pick").choose_then(function(id)
|
require("bufferline.pick").choose_then(function(id)
|
||||||
|
|
@ -91,7 +99,9 @@ M.open_lazygit = function()
|
||||||
height = 25,
|
height = 25,
|
||||||
},
|
},
|
||||||
on_close = function()
|
on_close = function()
|
||||||
if package.loaded["neo-tree"] then require("neo-tree.events").fire_event("git_event") end
|
if package.loaded["neo-tree"] then
|
||||||
|
require("neo-tree.events").fire_event("git_event")
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
:open()
|
:open()
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,8 @@ M.icons = {
|
||||||
Download = "",
|
Download = "",
|
||||||
}
|
}
|
||||||
|
|
||||||
M.fmt = function(icon, text, space) return M.icons[icon] .. string.rep(" ", space or 1) .. text end
|
M.fmt = function(icon, text, space)
|
||||||
|
return M.icons[icon] .. string.rep(" ", space or 1) .. text
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,19 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
M.leader = function(key) return "<leader>" .. key end
|
M.leader = function(key)
|
||||||
M.cmd = function(cmd) return "<cmd>" .. cmd .. "<CR>" end
|
return "<leader>" .. key
|
||||||
M.rcmd = function(cmd) return ":" .. cmd .. "<CR>" end
|
end
|
||||||
M.lua = function(cmd) return "<cmd>lua " .. cmd .. "<CR>" end
|
M.cmd = function(cmd)
|
||||||
M.notify = function(cmd) return M.cmd("call VSCodeNotify('" .. cmd .. "')") end
|
return "<cmd>" .. cmd .. "<CR>"
|
||||||
|
end
|
||||||
|
M.rcmd = function(cmd)
|
||||||
|
return ":" .. cmd .. "<CR>"
|
||||||
|
end
|
||||||
|
M.lua = function(cmd)
|
||||||
|
return "<cmd>lua " .. cmd .. "<CR>"
|
||||||
|
end
|
||||||
|
M.notify = function(cmd)
|
||||||
|
return M.cmd("call VSCodeNotify('" .. cmd .. "')")
|
||||||
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,9 @@ M.open_help_float = function()
|
||||||
vim.api.nvim_win_set_config(win, config)
|
vim.api.nvim_win_set_config(win, config)
|
||||||
vim.api.nvim_create_autocmd("WinClosed", {
|
vim.api.nvim_create_autocmd("WinClosed", {
|
||||||
pattern = tostring(win),
|
pattern = tostring(win),
|
||||||
callback = function() vim.api.nvim_buf_delete(buf, {}) end,
|
callback = function()
|
||||||
|
vim.api.nvim_buf_delete(buf, {})
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue