commit
95dc3b686a
35 files changed
+3045
No files matched your search
@@ -0,0 +1,27 @@
|
||||
--[[
|
||||
File: init.lua
|
||||
Description: Entry point file for neovim
|
||||
]]
|
||||
|
||||
vim.g.mapleader = ' ' -- Use Space, like key for alternative hotkeys
|
||||
|
||||
-- Bootsraping plugin manager
|
||||
vim.pack.add({ 'https://github.com/zuqini/zpack.nvim' })
|
||||
|
||||
|
||||
-- Settings
|
||||
require "settings"
|
||||
require('zpack').setup()
|
||||
|
||||
vim.opt.background = "dark" -- set this to dark or light
|
||||
vim.cmd("colorscheme teide-darker")
|
||||
require "keyboard"
|
||||
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
pattern = "*",
|
||||
callback = function(args)
|
||||
require("conform").format({ bufnr = args.buf })
|
||||
end,
|
||||
})
|
||||
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
||||
-- vim:tabstop=2 shiftwidth=2 expandtab syntax=lua foldmethod=marker foldlevelstart=0 foldlevel=0
|
||||
@@ -0,0 +1,59 @@
|
||||
return {
|
||||
-- icons used by other plugins
|
||||
icons = {
|
||||
debugger = {
|
||||
DapBreakpoint = " ", --▶️breakpoints
|
||||
DapBreakpointCondition = " ", --conditional breakpoints
|
||||
DapLogPoint = " ", --log points
|
||||
DapStopped = " ", --🟥indicate where the debugee is stopped
|
||||
DapBreakpointRejected = " ", --indicate breakpoints rejected by the debug
|
||||
},
|
||||
git = {
|
||||
add = { text = "│" }, --" ","▎"
|
||||
change = { text = "!" }, --" ",
|
||||
delete = { text = "_" }, --" ",""
|
||||
topdelete = { text = "‾" },
|
||||
changedelete = { text = "~" },
|
||||
untracked = { text = "┆" },
|
||||
},
|
||||
kinds = {
|
||||
Array = " ",
|
||||
Boolean = " ",
|
||||
Class = " ", --" ",
|
||||
Color = " ", --" ", " "
|
||||
Constant = " ",
|
||||
Constructor = "",
|
||||
Copilot = " ",
|
||||
Enum = " ",
|
||||
EnumMember = "",
|
||||
Event = " ", --"",
|
||||
Field = " ", --" "," "
|
||||
File = "", --
|
||||
Folder = " ", --
|
||||
Function = "", --" "
|
||||
Interface = " ", --"",
|
||||
Keyword = " ", --""
|
||||
Method = " ",
|
||||
Module = " ",
|
||||
Namespace = " ",
|
||||
Null = " ",
|
||||
Number = " ",
|
||||
Object = " ",
|
||||
Operator = " ", --"",
|
||||
Package = " ",
|
||||
Property = " ", --" ",
|
||||
Reference = " ", --"",
|
||||
Snippet = " ",
|
||||
String = " ",
|
||||
Struct = " ", --" ",
|
||||
Text = " ", --" ",
|
||||
TypeParameter = " ",
|
||||
Unit = " ", --"",
|
||||
Value = "",
|
||||
Variable = " ",
|
||||
},
|
||||
},
|
||||
-- options from nvim_open_win()| vim.diagnostic.open_float()
|
||||
-- | vim.lsp.util.open_floating_preview()| vim.diagnostic.config()
|
||||
---@type table
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
cmd = vim.cmd; -- Command function
|
||||
api = vim.api; -- Neovim API
|
||||
lsp = vim.lsp; -- LSP API
|
||||
fn = vim.fn; -- Vim function
|
||||
g = vim.g; -- Vim globals
|
||||
opt = vim.opt; -- Vim optionals
|
||||
theme = "vitesse" -- FIXME : CHANGE THEME
|
||||
@@ -0,0 +1,63 @@
|
||||
-- This file is intentionally left empty
|
||||
-- Put your keybindings with wk package here
|
||||
|
||||
local wk = require('which-key')
|
||||
local function mdesc(opt, description)
|
||||
return vim.tbl_extend("force", opt, { desc = description })
|
||||
end
|
||||
local map = function(mode, lhs, rhs, opts, desc)
|
||||
opts = opts and opts or {}
|
||||
opts = mdesc(opts, desc)
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
map({ "t", "i" }, "<C-h>", [[<C-\><C-N><C-w>h]])
|
||||
map({ "t", "i" }, "<C-j>", [[<C-\><C-N><C-w>j]])
|
||||
map({ "t", "i" }, "<C-k>", [[<C-\><C-N><C-w>k]])
|
||||
map({ "t", "i" }, "<C-l>", [[<C-\><C-N><C-w>l]])
|
||||
-- Move to window using the <ctrl> hjkl keys
|
||||
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window" })
|
||||
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window" })
|
||||
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window" })
|
||||
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window" })
|
||||
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
|
||||
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
|
||||
map(
|
||||
"n",
|
||||
"<C-Left>",
|
||||
"<cmd>vertical resize -2<cr>",
|
||||
{ desc = "Decrease window width" }
|
||||
)
|
||||
map(
|
||||
"n",
|
||||
"<C-Right>",
|
||||
"<cmd>vertical resize +2<cr>",
|
||||
{ desc = "Increase window width" }
|
||||
)
|
||||
map("n", "<leader>sh", "<C-W>s", { desc = "Split window below" })
|
||||
map("n", "<leader>sv", "<C-W>v", { desc = "Split window right" })
|
||||
|
||||
map({ "i", "v", "n", "s" }, "<C-s>", function()
|
||||
vim.cmd([[w]])
|
||||
end, { desc = "Save file" })
|
||||
|
||||
map({ "i", "v", "n", "s" }, "<leader>ww", function()
|
||||
vim.cmd([[w]])
|
||||
end, { desc = "Save file" })
|
||||
|
||||
map("n", "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
map("n", "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
|
||||
-- === Terminal === "
|
||||
-- Mapping to open terminal emulator in nvim
|
||||
-- open terminal on alt+t
|
||||
map({ "n", "t" }, "<M-t>", function()
|
||||
vim.cmd.split({ "term://" .. vim.env.SHELL })
|
||||
vim.cmd.resize({ 15 })
|
||||
end)
|
||||
-- mapping to close terminal emulator
|
||||
map("t", "<M-t>", [[<C-\><C-n>:bd!<CR>]])
|
||||
@@ -0,0 +1,183 @@
|
||||
return {
|
||||
'saghen/blink.cmp',
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = { 'rafamadriz/friendly-snippets', "onsails/lspkind.nvim", "xzbdmw/colorful-menu.nvim", "nvim-tree/nvim-web-devicons"},
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "v1.10.2",
|
||||
-- AND/OR build from source
|
||||
-- build = 'cargo build --release',
|
||||
-- If you use nix, you can build from source with:
|
||||
-- build = 'nix run .#build-plugin',
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
opts = {
|
||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||
-- 'enter' for enter to accept
|
||||
-- 'none' for no mappings
|
||||
--
|
||||
-- All presets have the following mappings:
|
||||
-- C-space: Open menu or open docs if already open
|
||||
-- C-n/C-p or Up/Down: Select next/previous item
|
||||
-- C-e: Hide menu
|
||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||
--
|
||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||
-- in your blink configuration
|
||||
keymap = {
|
||||
preset = 'none',
|
||||
|
||||
-- If completion hasn't been triggered yet, insert the first suggestion; if it has, cycle to the next suggestion.
|
||||
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
|
||||
['<C-e>'] = { 'hide', 'fallback' },
|
||||
|
||||
["<Tab>"] = { "select_next", "snippet_forward", "fallback" },
|
||||
["<S-Tab>"] = { "select_prev", "snippet_backward", "fallback" },
|
||||
|
||||
-- Selection with Enter
|
||||
["<CR>"] = { "accept", "fallback" },
|
||||
|
||||
['<Up>'] = { 'select_prev', 'fallback' },
|
||||
['<Down>'] = { 'select_next', 'fallback' },
|
||||
['<C-p>'] = { 'select_prev', 'fallback_to_mappings' },
|
||||
['<C-n>'] = { 'select_next', 'fallback_to_mappings' },
|
||||
|
||||
['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
|
||||
['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
|
||||
|
||||
['<C-k>'] = { 'show_signature', 'hide_signature', 'fallback' },
|
||||
},
|
||||
appearance = {
|
||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
||||
-- Adjusts spacing to ensure icons are aligned
|
||||
nerd_font_variant = 'mono'
|
||||
},
|
||||
|
||||
-- (Default) Only show the documentation popup when manually triggered
|
||||
completion = {
|
||||
ghost_text = {
|
||||
enabled = true
|
||||
},
|
||||
accept = {
|
||||
create_undo_point = true,
|
||||
auto_brackets = {
|
||||
enabled = true,
|
||||
kind_resolution = {
|
||||
enabled = true,
|
||||
},
|
||||
semantic_token_resolution = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
menu = {
|
||||
direction_priority = function()
|
||||
local ctx = require('blink.cmp').get_context()
|
||||
local item = require('blink.cmp').get_selected_item()
|
||||
if ctx == nil or item == nil then return { 's', 'n' } end
|
||||
|
||||
local item_text = item.textEdit ~= nil and item.textEdit.newText or item.insertText or item.label
|
||||
local is_multi_line = item_text:find('\n') ~= nil
|
||||
|
||||
-- after showing the menu upwards, we want to maintain that direction
|
||||
-- until we re-open the menu, so store the context id in a global variable
|
||||
if is_multi_line or vim.g.blink_cmp_upwards_ctx_id == ctx.id then
|
||||
vim.g.blink_cmp_upwards_ctx_id = ctx.id
|
||||
return { 'n', 's' }
|
||||
end
|
||||
return { 's', 'n' }
|
||||
end,
|
||||
columns = { { "kind_icon" }, { "label", gap = 1 } },
|
||||
components = {
|
||||
kind_icon = {
|
||||
text = function(ctx)
|
||||
local icon = ctx.kind_icon
|
||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||
local dev_icon, _ = require("nvim-web-devicons").get_icon(ctx.label)
|
||||
if dev_icon then
|
||||
icon = dev_icon
|
||||
end
|
||||
else
|
||||
icon = require("lspkind").symbol_map[ctx.kind] or ""
|
||||
end
|
||||
|
||||
return icon .. ctx.icon_gap
|
||||
end,
|
||||
|
||||
-- Optionally, use the highlight groups from nvim-web-devicons
|
||||
-- You can also add the same function for `kind.highlight` if you want to
|
||||
-- keep the highlight groups in sync with the icons.
|
||||
highlight = function(ctx)
|
||||
local hl = ctx.kind_hl
|
||||
if vim.tbl_contains({ "Path" }, ctx.source_name) then
|
||||
local dev_icon, dev_hl = require("nvim-web-devicons").get_icon(ctx.label)
|
||||
if dev_icon then
|
||||
hl = dev_hl
|
||||
end
|
||||
end
|
||||
return hl
|
||||
end,
|
||||
},
|
||||
label = {
|
||||
width = { fill = true, max = 60 },
|
||||
text = function(ctx)
|
||||
local highlights_info = require("colorful-menu").blink_highlights(ctx)
|
||||
if highlights_info ~= nil then
|
||||
-- Or you want to add more item to label
|
||||
return highlights_info.label
|
||||
else
|
||||
return ctx.label
|
||||
end
|
||||
end,
|
||||
highlight = function(ctx)
|
||||
local highlights = {}
|
||||
local highlights_info = require("colorful-menu").blink_highlights(ctx)
|
||||
if highlights_info ~= nil then
|
||||
highlights = highlights_info.highlights
|
||||
end
|
||||
for _, idx in ipairs(ctx.label_matched_indices) do
|
||||
table.insert(highlights, { idx, idx + 1, group = "BlinkCmpLabelMatch" })
|
||||
end
|
||||
-- Do something else
|
||||
return highlights
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
documentation = {
|
||||
auto_show = true,
|
||||
draw = function(opts)
|
||||
if opts.item and opts.item.documentation and opts.item.documentation.value then
|
||||
local out = require("pretty_hover.parser").parse(opts.item.documentation.value)
|
||||
opts.item.documentation.value = out:string()
|
||||
end
|
||||
|
||||
opts.default_implementation(opts)
|
||||
end,
|
||||
},
|
||||
list = {
|
||||
selection = {
|
||||
preselect = false,
|
||||
auto_insert = false
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
-- Default list of enabled providers defined so that you can extend it
|
||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
||||
sources = {
|
||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
||||
},
|
||||
|
||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
||||
--
|
||||
-- See the fuzzy documentation for more information
|
||||
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||
signature = { enabled = true }
|
||||
},
|
||||
opts_extend = { "sources.default" }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
url = "https://git.sr.ht/~chinmay/clangd_extensions.nvim",
|
||||
event = "LspAttach",
|
||||
opts = {}
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
return {
|
||||
"xzbdmw/colorful-menu.nvim",
|
||||
config = function()
|
||||
-- You don't need to set these options.
|
||||
require("colorful-menu").setup({
|
||||
ls = {
|
||||
lua_ls = {
|
||||
-- Maybe you want to dim arguments a bit.
|
||||
arguments_hl = "@comment",
|
||||
},
|
||||
gopls = {
|
||||
-- By default, we render variable/function's type in the right most side,
|
||||
-- to make them not to crowd together with the original label.
|
||||
|
||||
-- when true:
|
||||
-- foo *Foo
|
||||
-- ast "go/ast"
|
||||
|
||||
-- when false:
|
||||
-- foo *Foo
|
||||
-- ast "go/ast"
|
||||
align_type_to_right = true,
|
||||
-- When true, label for field and variable will format like "foo: Foo"
|
||||
-- instead of go's original syntax "foo Foo". If align_type_to_right is
|
||||
-- true, this option has no effect.
|
||||
add_colon_before_type = false,
|
||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
preserve_type_when_truncate = true,
|
||||
},
|
||||
-- for lsp_config or typescript-tools
|
||||
ts_ls = {
|
||||
-- false means do not include any extra info,
|
||||
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
vtsls = {
|
||||
-- false means do not include any extra info,
|
||||
-- see https://github.com/xzbdmw/colorful-menu.nvim/issues/42
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
["rust-analyzer"] = {
|
||||
-- Such as (as Iterator), (use std::io).
|
||||
extra_info_hl = "@comment",
|
||||
-- Similar to the same setting of gopls.
|
||||
align_type_to_right = true,
|
||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
preserve_type_when_truncate = true,
|
||||
},
|
||||
clangd = {
|
||||
-- Such as "From <stdio.h>".
|
||||
extra_info_hl = "@comment",
|
||||
-- Similar to the same setting of gopls.
|
||||
align_type_to_right = true,
|
||||
-- the hl group of leading dot of "•std::filesystem::permissions(..)"
|
||||
import_dot_hl = "@comment",
|
||||
-- See https://github.com/xzbdmw/colorful-menu.nvim/pull/36
|
||||
preserve_type_when_truncate = true,
|
||||
},
|
||||
zls = {
|
||||
-- Similar to the same setting of gopls.
|
||||
align_type_to_right = true,
|
||||
},
|
||||
roslyn = {
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
dartls = {
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
-- The same applies to pyright/pylance
|
||||
basedpyright = {
|
||||
-- It is usually import path such as "os"
|
||||
extra_info_hl = "@comment",
|
||||
},
|
||||
pylsp = {
|
||||
extra_info_hl = "@comment",
|
||||
-- Dim the function argument area, which is the main
|
||||
-- difference with pyright.
|
||||
arguments_hl = "@comment",
|
||||
},
|
||||
-- If true, try to highlight "not supported" languages.
|
||||
fallback = true,
|
||||
-- this will be applied to label description for unsupport languages
|
||||
fallback_extra_info_hl = "@comment",
|
||||
},
|
||||
-- If the built-in logic fails to find a suitable highlight group for a label,
|
||||
-- this highlight is applied to the label.
|
||||
fallback_highlight = "@variable",
|
||||
-- If provided, the plugin truncates the final displayed text to
|
||||
-- this width (measured in display cells). Any highlights that extend
|
||||
-- beyond the truncation point are ignored. When set to a float
|
||||
-- between 0 and 1, it'll be treated as percentage of the width of
|
||||
-- the window: math.floor(max_width * vim.api.nvim_win_get_width(0))
|
||||
-- Default 60.
|
||||
max_width = 60,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗███╗ ███╗]],
|
||||
[[████╗ ██║██╔�����██╔���██╗██║ ██║██║████╗ ████║]],
|
||||
[[██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║██╔████╔██║]],
|
||||
[[██║╚██╗██║██╔â•�â•�â•� ██║ ██║╚██╗ â–ˆâ
|
||||
–ˆâ•”â•�██║██║╚██╔â•�██║]],
|
||||
[[██║ ╚████║███████╗╚██████╔� ╚████╔� ██║██║ ╚�� ██║]],
|
||||
[[╚�� ╚����╚������� ╚������ ╚���� ╚��╚�� ╚��]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = " ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = " Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "ï…› New file",
|
||||
group = "Macro",
|
||||
key = "n",
|
||||
action = "NvimTreeToggle",
|
||||
},
|
||||
{
|
||||
desc = "� Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "� Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = "¿ ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = "¿ Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "¿ Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = " ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = " Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "� Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "� Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
return {
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("nvim-autopairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function(_, opts)
|
||||
require("Comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
cmd = { "TodoTelescope", "TodoLocList" },
|
||||
config = true,
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "]t", function() require("todo-comments").jump_next() end, desc = "Next todo comment" },
|
||||
{ "[t", function() require("todo-comments").jump_prev() end, desc = "Previous todo comment" },
|
||||
{ "<leader>tt", "<cmd>TodoTelescope<cr>", desc = "List Todo in Telescope" },
|
||||
{ "<leader>tl", "<cmd>TodoLocList<cr>", desc = "List Todo in LocList" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
init = function()
|
||||
vim.cmd([[hi DashboardHeader guifg=#ee872d gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardProjectIcon guifg=#89ca78]])
|
||||
vim.cmd([[hi DashboardMruTitle guifg=#d55fde gui=bold]])
|
||||
vim.cmd([[hi DashboardShortCut guifg=#89ca78 gui=bold]])
|
||||
end,
|
||||
opts = {
|
||||
theme = "hyper",
|
||||
config = {
|
||||
header = {
|
||||
[[]],
|
||||
[[¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿]],
|
||||
[[¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿ ¿¿¿]],
|
||||
[[¿¿¿ ¿¿¿¿¿¿¿¿¿¿¿¿¿ ¿¿¿¿¿¿¿ ¿¿¿¿¿ ¿¿¿¿¿¿ ¿¿¿]],
|
||||
[[]],
|
||||
},
|
||||
shortcut = {
|
||||
{
|
||||
icon = " ", --
|
||||
desc = " Files",
|
||||
group = "Label",
|
||||
key = "f",
|
||||
action = "Telescope find_files",
|
||||
},
|
||||
{
|
||||
desc = " Find text",
|
||||
group = "@property",
|
||||
key = "g",
|
||||
action = "Telescope live_grep ",
|
||||
},
|
||||
{
|
||||
desc = "ï…› New file",
|
||||
group = "Macro",
|
||||
key = "n",
|
||||
action = "NvimTreeToggle",
|
||||
},
|
||||
{
|
||||
desc = "� Config",
|
||||
group = "DiagnosticHint",
|
||||
key = "c",
|
||||
action = "e $MYVIMRC ",
|
||||
},
|
||||
{
|
||||
desc = "� Quit",
|
||||
group = "Number",
|
||||
key = "q",
|
||||
action = "qa",
|
||||
},
|
||||
-- {
|
||||
-- desc = " Recent files",
|
||||
-- group = "",
|
||||
-- key = "r",
|
||||
-- action = "Telescope oldfiles ",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = "󰊳 Update",
|
||||
-- group = "@property",
|
||||
-- key = "u",
|
||||
-- action = "Lazy update",
|
||||
-- },
|
||||
-- {
|
||||
-- icon="",
|
||||
-- icon_hl = "@variable",
|
||||
-- desc = "Apps",
|
||||
-- group = "DiagnosticHint",
|
||||
-- key = "a",
|
||||
-- action = "Telescope app",
|
||||
-- },
|
||||
-- {
|
||||
-- desc = " dotfiles",
|
||||
-- group = "Number",
|
||||
-- key = "d",
|
||||
-- action = "Telescope dotfiles",
|
||||
-- },
|
||||
},
|
||||
},
|
||||
hide = {
|
||||
statusline = true, -- hide statusline default is true
|
||||
tabline = false, -- hide the tabline
|
||||
winbar = true, -- hide winbar
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
return {
|
||||
'stevearc/conform.nvim',
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
cpp = { "clang-format", lsp_format = "fallback"}
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
return {
|
||||
"rebelot/heirline.nvim",
|
||||
dependencies = { "Zeioth/heirline-components.nvim" },
|
||||
opts = function()
|
||||
local lib = require "heirline-components.all"
|
||||
return {
|
||||
opts = {
|
||||
disable_winbar_cb = function(args) -- We do this to avoid showing it on the greeter.
|
||||
local is_disabled = not require("heirline-components.buffer").is_valid(args.buf) or
|
||||
lib.condition.buffer_matches({
|
||||
buftype = { "terminal", "prompt", "nofile", "help", "quickfix" },
|
||||
filetype = { "NvimTree", "neo%-tree", "dashboard", "Outline", "aerial" },
|
||||
}, args.buf)
|
||||
return is_disabled
|
||||
end,
|
||||
},
|
||||
tabline = { -- UI upper bar
|
||||
-- lib.component.tabline_conditional_padding(),
|
||||
-- lib.component.tabline_buffers(),
|
||||
-- lib.component.fill { hl = { bg = "tabline_bg" } },
|
||||
-- lib.component.tabline_tabpages()
|
||||
},
|
||||
winbar = { -- UI breadcrumbs bar
|
||||
init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end,
|
||||
fallthrough = false,
|
||||
-- Winbar for terminal, neotree, and aerial.
|
||||
{
|
||||
condition = function() return not lib.condition.is_active() end,
|
||||
{
|
||||
lib.component.neotree(),
|
||||
lib.component.compiler_play(),
|
||||
lib.component.fill(),
|
||||
lib.component.compiler_build_type(),
|
||||
lib.component.compiler_redo(),
|
||||
lib.component.aerial(),
|
||||
},
|
||||
},
|
||||
-- Regular winbar
|
||||
{
|
||||
lib.component.neotree(),
|
||||
lib.component.compiler_play(),
|
||||
lib.component.fill(),
|
||||
lib.component.breadcrumbs(),
|
||||
lib.component.fill(),
|
||||
lib.component.compiler_redo(),
|
||||
lib.component.aerial(),
|
||||
}
|
||||
},
|
||||
statuscolumn = { -- UI left column
|
||||
init = function(self) self.bufnr = vim.api.nvim_get_current_buf() end,
|
||||
lib.component.foldcolumn(),
|
||||
lib.component.numbercolumn(),
|
||||
lib.component.signcolumn(),
|
||||
} or nil,
|
||||
statusline = { -- UI statusbar
|
||||
hl = { fg = "fg", bg = "bg" },
|
||||
lib.component.mode(),
|
||||
lib.component.git_branch(),
|
||||
lib.component.file_info(),
|
||||
lib.component.git_diff(),
|
||||
lib.component.diagnostics(),
|
||||
lib.component.fill(),
|
||||
lib.component.cmd_info(),
|
||||
lib.component.fill(),
|
||||
lib.component.lsp(),
|
||||
lib.component.compiler_state(),
|
||||
lib.component.virtual_env(),
|
||||
lib.component.nav(),
|
||||
lib.component.mode { surround = { separator = "right" } },
|
||||
},
|
||||
}
|
||||
end,
|
||||
config = function(_, opts)
|
||||
local heirline = require "heirline"
|
||||
local heirline_components = require "heirline-components.all"
|
||||
|
||||
-- Setup
|
||||
heirline_components.init.subscribe_to_events()
|
||||
heirline.load_colors(heirline_components.hl.get_colors())
|
||||
heirline.setup(opts)
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
---@type LazySpec
|
||||
return {
|
||||
{
|
||||
"akioweh/lsp-document-highlight.nvim",
|
||||
lazy = false,
|
||||
keys = {
|
||||
{
|
||||
"[[",
|
||||
function()
|
||||
require("lsp-document-highlight").jump(-vim.v.count1, true)
|
||||
end,
|
||||
desc = "Previous Reference",
|
||||
},
|
||||
{
|
||||
"]]",
|
||||
function()
|
||||
require("lsp-document-highlight").jump(vim.v.count1, true)
|
||||
end,
|
||||
desc = "Next Reference",
|
||||
},
|
||||
},
|
||||
---@type LDH.config
|
||||
opts = {
|
||||
throttle = 50,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,343 @@
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
dependencies = { 'saghen/blink.cmp', 'ibhagwan/fzf-lua', {
|
||||
"nvimdev/lspsaga.nvim",
|
||||
event = "LspAttach",
|
||||
opts = {
|
||||
ui = {
|
||||
border = "shadow",
|
||||
},
|
||||
outline = {
|
||||
layout = "float",
|
||||
},
|
||||
},
|
||||
}, },
|
||||
|
||||
-- example using `opts` for defining servers
|
||||
opts = {
|
||||
servers = {
|
||||
lua_ls = {},
|
||||
clangd = {
|
||||
cmd = {
|
||||
"/opt/clangd/bin/clangd",
|
||||
--"clangd"),
|
||||
"--compile-commands-dir=build",
|
||||
"--all-scopes-completion",
|
||||
"--background-index",
|
||||
"--clang-tidy",
|
||||
"--completion-style=bundled",
|
||||
"--experimental-modules-support",
|
||||
"--function-arg-placeholders=1",
|
||||
"--header-insertion=iwyu",
|
||||
"--header-insertion-decorators",
|
||||
"--malloc-trim",
|
||||
"--pch-storage=memory"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
config = function(_, opts)
|
||||
local keymap = vim.keymap
|
||||
local autocmd = vim.api.nvim_create_autocmd -- create autocmd
|
||||
local utils = require("utils")
|
||||
local map = utils.map
|
||||
local augroup = utils.augroup
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
-- Buffer local mappings.
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
local opts = { buffer = ev.buf, silent = true }
|
||||
local bufnr = ev.buf
|
||||
local client = vim.lsp.get_client_by_id(ev.data.client_id)
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
vim.lsp.inlay_hint.enable(true)
|
||||
end
|
||||
if client.server_capabilities.hoverProvider then
|
||||
map("n", "K", function()
|
||||
vim.lsp.buf.hover()
|
||||
end, opts, "get hover info")
|
||||
end
|
||||
if client.server_capabilities.semanticTokensProvider then
|
||||
map("n", "<leader>us", function()
|
||||
utils.toggle("enable_semantic_tokens", { global = true }, nil)
|
||||
if vim.g["enable_semantic_tokens"] then
|
||||
vim.lsp.semantic_tokens.start(bufnr, client.id)
|
||||
else
|
||||
vim.lsp.semantic_tokens.stop(bufnr, client.id)
|
||||
end
|
||||
end, opts, "toggle semantic token highlighting")
|
||||
end
|
||||
if client.server_capabilities.signatureHelpProvider then
|
||||
map(
|
||||
"n",
|
||||
"<leader>k",
|
||||
vim.lsp.buf.signature_help,
|
||||
opts,
|
||||
"get fn signature help"
|
||||
)
|
||||
end
|
||||
if client.server_capabilities.declarationProvider then
|
||||
map(
|
||||
"n",
|
||||
"<leader>gD",
|
||||
vim.lsp.buf.declaration,
|
||||
opts,
|
||||
"goto declaration"
|
||||
)
|
||||
end
|
||||
-- if client.server_capabilities.completionProvider then
|
||||
-- vim.bo[bufnr].omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||
-- end
|
||||
if client.server_capabilities.definitionProvider then
|
||||
-- vim.bo[bufnr].tagfunc = "v:lua.vim.lsp.tagfunc"
|
||||
map("n", "<leader>gd", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga goto_definition]])
|
||||
else
|
||||
vim.lsp.buf.definition()
|
||||
end
|
||||
end, opts, "goto definition")
|
||||
|
||||
if utils.has("lspsaga.nvim") then
|
||||
map("n", "<leader>pd", function()
|
||||
vim.cmd([[Lspsaga peek_definition]])
|
||||
end, opts, "peek definition")
|
||||
end
|
||||
end
|
||||
if client.server_capabilities.typeDefinitionProvider then
|
||||
map("n", "<leader>gt", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga goto_type_definition]])
|
||||
else
|
||||
vim.lsp.buf.type_definition()
|
||||
end
|
||||
end, opts, "goto type definition")
|
||||
|
||||
if utils.has("lspsaga.nvim") then
|
||||
map("n", "<leader>pt", function()
|
||||
vim.cmd([[Lspsaga peek_type_definition]])
|
||||
end, opts, "peek type definition")
|
||||
end
|
||||
end
|
||||
if client.server_capabilities.implementationProvider then
|
||||
map("n", "<leader>gi", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga finder imp+def]])
|
||||
else
|
||||
vim.lsp.buf.implementation()
|
||||
end
|
||||
end, opts, "goto type implementation")
|
||||
end
|
||||
if client.server_capabilities.referencesProvider then
|
||||
map("n", "<leader>gr", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga finder ref]])
|
||||
else
|
||||
vim.lsp.buf.references({})
|
||||
end
|
||||
end, opts, "goto type references")
|
||||
end
|
||||
if client.server_capabilities.documentHighlightProvider then
|
||||
vim.api.nvim_set_hl(0, "LspReferenceRead", {
|
||||
link = "DiffText",
|
||||
})
|
||||
vim.api.nvim_set_hl(0, "LspReferenceText", {
|
||||
link = "IncSearch",
|
||||
})
|
||||
vim.api.nvim_set_hl(0, "LspRefDiffTexterenceWrite", {
|
||||
link = "WildMenu",
|
||||
})
|
||||
local doc_highlight = augroup("lsp_document_highlight")
|
||||
local enable_highlight = function()
|
||||
autocmd({ "CursorHold", "CursorHoldI" }, {
|
||||
group = doc_highlight,
|
||||
buffer = bufnr,
|
||||
callback = vim.lsp.buf.document_highlight,
|
||||
})
|
||||
autocmd("CursorMoved", {
|
||||
group = doc_highlight,
|
||||
buffer = bufnr,
|
||||
callback = vim.lsp.buf.clear_references,
|
||||
})
|
||||
end
|
||||
local disable_highlight = function()
|
||||
vim.lsp.buf.clear_references()
|
||||
vim.api.nvim_clear_autocmds({
|
||||
buffer = bufnr,
|
||||
group = doc_highlight,
|
||||
})
|
||||
end
|
||||
map("n", "<leader>uh", function()
|
||||
utils.toggle(
|
||||
"highlight",
|
||||
{},
|
||||
{ enable_highlight, disable_highlight }
|
||||
)
|
||||
vim.b[vim.fn.bufnr()]["highlight"]()
|
||||
end, opts, "toggle document highlight")
|
||||
end
|
||||
if client.server_capabilities.documentSymbolProvider then
|
||||
map(
|
||||
"n",
|
||||
"<leader>ds",
|
||||
vim.lsp.buf.document_symbol,
|
||||
opts,
|
||||
"document symbols"
|
||||
)
|
||||
end
|
||||
if client.server_capabilities.codeActionProvider then
|
||||
map({ "n", "v" }, "<leader>ca", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga code_action]])
|
||||
else
|
||||
vim.lsp.buf.code_action()
|
||||
end
|
||||
end, opts, "code action")
|
||||
end
|
||||
if client.server_capabilities.documentFormattingProvider then
|
||||
map("n", "<leader>uf", function()
|
||||
utils.toggle("autoformat", { global = true })
|
||||
autocmd("BufWritePre", {
|
||||
group = augroup("LspFormat"),
|
||||
callback = function()
|
||||
if vim.g["autoformat"] then
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end
|
||||
end,
|
||||
})
|
||||
end, opts, "toggle autoformat")
|
||||
|
||||
map("n", "<leader>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts, "range format buffer")
|
||||
end
|
||||
if client.server_capabilities.documentRangeFormattingProvider then
|
||||
map("v", "<leader>f", function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end, opts, "range format buffer")
|
||||
end
|
||||
if client.server_capabilities.renameProvider then
|
||||
map("n", "<leader>rn", function()
|
||||
vim.lsp.buf.rename()
|
||||
end, opts, "rename symbol")
|
||||
|
||||
if utils.has("lspsaga.nvim") then
|
||||
map("n", "<leader>rnw", function()
|
||||
vim.cmd([[Lspsaga project_replace]])
|
||||
end, opts, "rename across workspace")
|
||||
end
|
||||
end
|
||||
if client.server_capabilities.callHierarchyProvider then
|
||||
map("n", "<leader>ci", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga incoming_calls]])
|
||||
else
|
||||
vim.lsp.buf.incoming_calls()
|
||||
end
|
||||
end, opts, "incoming calls")
|
||||
map("n", "<leader>co", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga outgoing_calls]])
|
||||
else
|
||||
vim.lsp.buf.outgoing_calls()
|
||||
end
|
||||
end, opts, "outgoing calls")
|
||||
end
|
||||
if client.server_capabilities.workspaceSymbolProvider then
|
||||
map(
|
||||
"n",
|
||||
"<leader>ws",
|
||||
vim.lsp.buf.workspace_symbol,
|
||||
opts,
|
||||
"list workspace symbols"
|
||||
)
|
||||
end
|
||||
|
||||
map("n", "[d", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga diagnostic_jump_prev]])
|
||||
else
|
||||
vim.diagnostic.jump({count = -1, float = true})
|
||||
end
|
||||
end, opts, "goto previous diagnostics")
|
||||
map("n", "]d", function()
|
||||
if utils.has("lspsaga.nvim") then
|
||||
vim.cmd([[Lspsaga diagnostic_jump_next]])
|
||||
else
|
||||
vim.diagnostic.jump({count = 1, float = true})
|
||||
end
|
||||
end, opts, "goto next diagnostics")
|
||||
|
||||
if utils.has("lspsaga.nvim") then
|
||||
map("n", "<leader>wd", function()
|
||||
vim.cmd([[Lspsaga show_workspace_diagnostics]]) --can use ++normal to show in loclist
|
||||
end, opts, "workspace diagnostics")
|
||||
map("n", "<leader>bd", function()
|
||||
vim.cmd([[Lspsaga show_buf_diagnostics]])
|
||||
end, opts, "workspace diagnostics")
|
||||
map("n", "<leader>wo", function()
|
||||
vim.cmd([[Lspsaga outline]])
|
||||
end, opts, "workspace outline")
|
||||
end
|
||||
map("n", "<leader>sl", vim.diagnostic.setloclist, opts, "set loclist")
|
||||
map("n", "<leader>of", vim.diagnostic.open_float, opts, "open float")
|
||||
|
||||
map("n", "<leader>wf", function()
|
||||
vim.print(vim.lsp.buf.list_workspace_folders())
|
||||
end, opts, "list workspace folders")
|
||||
map("n", "<leader>rd", function()
|
||||
print(
|
||||
"Language server "
|
||||
.. (vim.lsp.buf.server_ready() and "is ready" or "is not ready")
|
||||
)
|
||||
end, opts, "check if lsp is ready")
|
||||
|
||||
-- K for hover is now a built-in default in Neovim 0.12
|
||||
|
||||
end,
|
||||
})
|
||||
for server, config in pairs(opts.servers) do
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities.textDocument.foldingRange = {
|
||||
dynamicRegistration = false,
|
||||
lineFoldingOnly = true,
|
||||
}
|
||||
-- passing config.capabilities to blink.cmp merges with the capabilities in your
|
||||
-- `opts[server].capabilities, if you've defined it
|
||||
config.capabilities = require('blink.cmp').get_lsp_capabilities(capabilities)
|
||||
vim.lsp.config(server, config)
|
||||
vim.lsp.enable(server)
|
||||
end
|
||||
vim.api.nvim_create_user_command("LspInfo", "checkhealth vim.lsp", {
|
||||
desc = "Show LSP Info",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("LspLog", function(_)
|
||||
local log_path = vim.lsp.log.get_filename()
|
||||
|
||||
vim.cmd(string.format("edit %s", log_path))
|
||||
end, {
|
||||
desc = "Show LSP log",
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("LspRestart", "lsp restart", {
|
||||
desc = "Restart LSP",
|
||||
})
|
||||
|
||||
--- show LSP progress (works on Ghostty)
|
||||
vim.api.nvim_create_autocmd("LspProgress", {
|
||||
callback = function(ev)
|
||||
local value = ev.data.params.value
|
||||
vim.api.nvim_echo({ { value.message or "done" } }, false, {
|
||||
id = "lsp." .. ev.data.client_id,
|
||||
kind = "progress",
|
||||
source = "vim.lsp",
|
||||
title = value.title,
|
||||
status = value.kind ~= "end" and "running" or "success",
|
||||
percent = value.percentage,
|
||||
})
|
||||
end,
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
return{}
|
||||
-- 'nvimdev/lspsaga.nvim',
|
||||
-- event = 'LspAttach',
|
||||
-- config = function()
|
||||
-- require('lspsaga').setup({})
|
||||
-- end,
|
||||
-- dependencies = {
|
||||
-- 'nvim-treesitter/nvim-treesitter', -- optional
|
||||
-- 'nvim-tree/nvim-web-devicons', -- optional
|
||||
-- }
|
||||
--}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"Fildo7525/pretty_hover",
|
||||
event = "LspAttach",
|
||||
opts = {}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
-- optional but recommended
|
||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
return {
|
||||
{
|
||||
"serhez/teide.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
on_highlights = function(hl, c)
|
||||
local prompt = "#2d3149"
|
||||
hl.TelescopeNormal = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.fg_dark,
|
||||
}
|
||||
hl.TelescopeBorder = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.bg_dark,
|
||||
}
|
||||
hl.TelescopePromptNormal = {
|
||||
bg = prompt,
|
||||
}
|
||||
hl.TelescopePromptBorder = {
|
||||
bg = prompt,
|
||||
fg = prompt,
|
||||
}
|
||||
hl.TelescopePromptTitle = {
|
||||
bg = prompt,
|
||||
fg = prompt,
|
||||
}
|
||||
hl.TelescopePreviewTitle = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.bg_dark,
|
||||
}
|
||||
hl.TelescopeResultsTitle = {
|
||||
bg = c.bg_dark,
|
||||
fg = c.bg_dark,
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
-- "nyoom-engineering/oxocarbon.nvim"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
--[[
|
||||
File: treesitter.lua
|
||||
Description: Configuration of tree-sitter
|
||||
See: https://github.com/tree-sitter/tree-sitter
|
||||
]]
|
||||
|
||||
return {
|
||||
"romus204/tree-sitter-manager.nvim",
|
||||
dependencies = {}, -- tree-sitter CLI must be installed system-wide
|
||||
config = function()
|
||||
require("tree-sitter-manager").setup({
|
||||
-- Default Options
|
||||
ensure_installed = {"cpp", "cmake"}, -- list of parsers to install at the start of a neovim session
|
||||
-- border = nil, -- border style for the window (e.g. "rounded", "single"), if nil, use the default border style defined by 'vim.o.winborder'. See :h 'winborder' for more info.
|
||||
auto_install = true, -- if enabled, install missing parsers when editing a new file
|
||||
highlight = true, -- treesitter highlighting is enabled by default
|
||||
-- languages = {}, -- override or add new parser sources
|
||||
-- parser_dir = vim.fn.stdpath("data") .. "/site/parser",
|
||||
-- query_dir = vim.fn.stdpath("data") .. "/site/queries",
|
||||
})
|
||||
end
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
return {
|
||||
-- indent guides for Neovim
|
||||
{
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
main = "ibl",
|
||||
opts = {
|
||||
indent = {
|
||||
char = "▏",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- active indent guide and indent text objects
|
||||
{
|
||||
"echasnovski/mini.indentscope",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
opts = {
|
||||
-- symbol = "▏",
|
||||
symbol = "│",
|
||||
options = { try_as_border = true },
|
||||
},
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = {
|
||||
"help",
|
||||
"alpha",
|
||||
"dashboard",
|
||||
"neo-tree",
|
||||
"Trouble",
|
||||
"lazy",
|
||||
"mason",
|
||||
"notify",
|
||||
"toggleterm",
|
||||
"lazyterm",
|
||||
},
|
||||
callback = function()
|
||||
vim.b.miniindentscope_disable = true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
-- better vim.ui
|
||||
{ "MunifTanjim/nui.nvim", lazy = true },
|
||||
-- Better `vim.notify()`
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
lazy = true,
|
||||
keys = {
|
||||
{
|
||||
"<leader>un",
|
||||
function()
|
||||
require("notify").dismiss({ silent = true, pending = true })
|
||||
end,
|
||||
desc = "Clear notifications",
|
||||
},
|
||||
},
|
||||
opts = { timeout = 3000 },
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
lsp = {
|
||||
progress = {
|
||||
enabled = false,
|
||||
},
|
||||
override = {
|
||||
-- override the default lsp markdown formatter with Noice
|
||||
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
||||
-- override the lsp markdown formatter with Noice
|
||||
["vim.lsp.util.stylize_markdown"] = true,
|
||||
-- override cmp documentation with Noice (needs the other options to work)
|
||||
["cmp.entry.get_documentation"] = false,
|
||||
},
|
||||
--NOTE: install parsers for markdown and markdown_inline to see markdown documentation
|
||||
hover = {
|
||||
enabled = false,
|
||||
},
|
||||
signature = {
|
||||
enabled = false,
|
||||
},
|
||||
message = {
|
||||
enabled = true, -- Messages shown by lsp servers
|
||||
},
|
||||
},
|
||||
health = {
|
||||
checker = false, -- Disable if you don't want health checks to run
|
||||
},
|
||||
presets = {
|
||||
-- you can enable a preset by setting it to true, or a table that will override the preset config
|
||||
-- you can also add custom presets that you can enable/disable with enabled=true
|
||||
bottom_search = false, -- use a classic bottom cmdline for search
|
||||
command_palette = true, -- position the cmdline and popupmenu together
|
||||
long_message_to_split = false, -- long messages will be sent to a split
|
||||
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
||||
lsp_doc_border = false, -- add a border to hover docs and signature help
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
config = function()
|
||||
require("lsp_lines").setup()
|
||||
vim.diagnostic.config({ virtual_lines = true })
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
config = true,
|
||||
init = function()
|
||||
vim.o.timeout = true
|
||||
vim.o.timeoutlen = 300
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
--[[
|
||||
File: settings.lua
|
||||
Description: Base settings for neovim
|
||||
Info: Use <zo> and <zc> to open and close foldings
|
||||
]]
|
||||
|
||||
require "helpers/globals"
|
||||
g.autochdir = true
|
||||
-- Set associating between turned on plugins and filetype
|
||||
cmd[[filetype plugin on]]
|
||||
|
||||
-- Disable comments on pressing Enter
|
||||
cmd[[autocmd FileType * setlocal formatoptions-=cro]]
|
||||
|
||||
-- Tabs {{{
|
||||
opt.expandtab = true -- Use spaces by default
|
||||
opt.shiftwidth = 4 -- Set amount of space characters, when we press "<" or ">"
|
||||
opt.tabstop = 4 -- 1 tab equal 2 spaces
|
||||
opt.smartindent = true -- Turn on smart indentation. See in the docs for more info
|
||||
opt.softtabstop = -1
|
||||
-- }}}
|
||||
|
||||
-- Clipboard {{{
|
||||
opt.clipboard = 'unnamedplus' -- Use system clipboard
|
||||
opt.fixeol = false -- Turn off appending new line in the end of a file
|
||||
-- }}}
|
||||
|
||||
-- Folding {{{
|
||||
opt.foldmethod = "expr"
|
||||
|
||||
opt.foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
-- }}}
|
||||
|
||||
-- Search {{{
|
||||
opt.ignorecase = true -- Ignore case if all characters in lower case
|
||||
opt.joinspaces = false -- Join multiple spaces in search
|
||||
opt.smartcase = true -- When there is a one capital letter search for exact match
|
||||
opt.showmatch = true -- Highlight search instances
|
||||
-- }}}
|
||||
|
||||
-- Window {{{
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitright = true -- Put new vertical splits to right
|
||||
-- }}}
|
||||
|
||||
-- Wild Menu {{{
|
||||
opt.wildmenu = true
|
||||
opt.wildmode = "longest:full,full"
|
||||
-- }}}
|
||||
|
||||
opt.number = true
|
||||
opt.relativenumber = true
|
||||
opt.breakindent = true
|
||||
opt.numberwidth = 2
|
||||
opt.cmdheight = 0
|
||||
opt.colorcolumn = '+0' -- Align text at 'textwidth'
|
||||
opt.showtabline = 0 -- Always show the tabs line
|
||||
opt.helpheight = 0 -- Disable help window resizing
|
||||
opt.winwidth = 30 -- Minimum width for active window
|
||||
opt.winheight = 1 -- Minimum height for active window
|
||||
opt.winminheight = 1 -- Minimum height for inactive window
|
||||
opt.showbreak = '⤷ ' -- ↪ ⤷
|
||||
opt.listchars = {
|
||||
tab = ' ',
|
||||
extends = '⟫',
|
||||
precedes = '⟪',
|
||||
conceal = '',
|
||||
nbsp = '␣',
|
||||
trail = '·'
|
||||
}
|
||||
opt.fillchars = {
|
||||
foldopen = '', --
|
||||
foldclose = '', --
|
||||
fold = ' ', -- ⸱
|
||||
foldsep = ' ',
|
||||
diff = '╱',
|
||||
eob = ' ',
|
||||
horiz = '━',
|
||||
horizup = '┻',
|
||||
horizdown = '┳',
|
||||
vert = '┃',
|
||||
vertleft = '┫',
|
||||
vertright = '┣',
|
||||
verthoriz = '╋',
|
||||
}
|
||||
opt.scrolloff = 3
|
||||
opt.history = 500
|
||||
opt.undofile = true
|
||||
opt.signcolumn = "yes:1"
|
||||
opt.colorcolumn = "150"
|
||||
opt.foldlevel = 999
|
||||
opt.lazyredraw = false
|
||||
g.elite_mode = true
|
||||
g.autoformat = true
|
||||
-- Default Plugins {{{
|
||||
local disabled_built_ins = {
|
||||
"netrw",
|
||||
"netrwPlugin",
|
||||
"netrwSettings",
|
||||
"netrwFileHandlers",
|
||||
"gzip",
|
||||
"zip",
|
||||
"zipPlugin",
|
||||
"tar",
|
||||
"tarPlugin",
|
||||
"getscript",
|
||||
"getscriptPlugin",
|
||||
"vimball",
|
||||
"vimballPlugin",
|
||||
"2html_plugin",
|
||||
"logipat",
|
||||
"rrhelper",
|
||||
"spellfile_plugin",
|
||||
"matchit"
|
||||
}
|
||||
|
||||
for _, plugin in pairs(disabled_built_ins) do
|
||||
g["loaded_" .. plugin] = 1
|
||||
end
|
||||
-- }}}
|
||||
local diagnostic = vim.diagnostic
|
||||
local api = vim.api
|
||||
local defaults = require("defaults")
|
||||
-- global config for diagnostic
|
||||
diagnostic.config {
|
||||
underline = true,
|
||||
virtual_text = {
|
||||
severity = { min = vim.diagnostic.severity.WARN, max = vim.diagnostic.severity.ERROR },
|
||||
source = "if_many",
|
||||
spacing = 0,
|
||||
prefix = "●",
|
||||
},
|
||||
update_in_insert = true,
|
||||
virtual_lines = true,
|
||||
signs = {
|
||||
text = {
|
||||
[diagnostic.severity.ERROR] = "🆇",
|
||||
[diagnostic.severity.WARN] = "⚠️",
|
||||
[diagnostic.severity.INFO] = "ℹ️",
|
||||
[diagnostic.severity.HINT] = "",
|
||||
},
|
||||
},
|
||||
severity_sort = true,
|
||||
float = {
|
||||
--nvim_open_win() options
|
||||
relative = "cursor",
|
||||
-- "single": A single line box.
|
||||
-- "double": A double line box.
|
||||
-- "rounded": Like "single", but with rounded corners "╭"
|
||||
-- "solid": Adds padding by a single whitespace cell.
|
||||
-- "shadow": A drop shadow effect by blending with the
|
||||
-- "none": No border (default).
|
||||
border = "shadow",
|
||||
-- vim.lsp.util.open_floating_preview()
|
||||
max_width = math.floor(vim.o.columns * 0.84),
|
||||
max_height = math.floor(vim.o.lines * 0.6),
|
||||
close_events = {
|
||||
"BufLeave",
|
||||
"CursorMoved",
|
||||
"InsertEnter",
|
||||
"FocusLost",
|
||||
},
|
||||
focusable = false,
|
||||
zindex = 3,
|
||||
focus = false,
|
||||
-- vim.diagnostic.open_float()
|
||||
source = "if_many",
|
||||
severity_sort = true,
|
||||
}
|
||||
}
|
||||
-- :h highlight-args and :h cterm-colors
|
||||
vim.api.nvim_set_hl(0, "Search", {
|
||||
ctermfg = 0,
|
||||
ctermbg = 11,
|
||||
cterm = { bold = true },
|
||||
bg = "Blue",
|
||||
fg = "Magenta",
|
||||
standout = true,
|
||||
underdotted = true,
|
||||
})
|
||||
local augroup = function(name)
|
||||
return vim.api.nvim_create_augroup(name, { clear = true })
|
||||
end
|
||||
local autocmd = vim.api.nvim_create_autocmd -- create autocmd
|
||||
autocmd("TextYankPost", {
|
||||
group = augroup("highlight_yank"),
|
||||
callback = function()
|
||||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
-- resize splits if window got resized
|
||||
autocmd({ "VimResized" }, {
|
||||
group = augroup("resize_splits"),
|
||||
callback = function()
|
||||
vim.cmd("wincmd =")
|
||||
vim.cmd("tabdo wincmd =")
|
||||
end,
|
||||
})
|
||||
-- vim: tabstop=2 shiftwidth=2 expandtab syntax=lua foldmethod=marker foldlevelstart=1
|
||||
+230
@@ -0,0 +1,230 @@
|
||||
local M = {}
|
||||
|
||||
function _G.dump(...)
|
||||
vim.print(...)
|
||||
end
|
||||
|
||||
function M.reload_all()
|
||||
for name, _ in pairs(package.loaded) do
|
||||
if name:match("^config") or name:match("^plugins") then
|
||||
package.loaded[name] = nil
|
||||
end
|
||||
end
|
||||
-- Reload after/ directory
|
||||
local glob = vim.fn.stdpath("config") .. "/ftplugin/**/*.lua"
|
||||
local ftplugin_lua_filepaths = vim.fn.glob(glob, true, true)
|
||||
|
||||
for _, filepath in ipairs(ftplugin_lua_filepaths) do
|
||||
dofile(filepath)
|
||||
end
|
||||
|
||||
dofile(vim.env.MYVIMRC)
|
||||
end
|
||||
|
||||
function M.reload_one(module)
|
||||
for name, _ in pairs(package.loaded) do
|
||||
if name:match("^" .. module) then
|
||||
package.loaded[name] = nil
|
||||
require(name)
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--{ "git", "rg", { "fd", "fdfind" }, "lazygit" }
|
||||
M.check_if_cmd_exist = function(cmds)
|
||||
local result = {}
|
||||
for _, cmd in ipairs(cmds) do
|
||||
local name = type(cmd) == "string" and cmd or vim.inspect(cmd)
|
||||
local commands = type(cmd) == "string" and { cmd } or cmd
|
||||
---@cast commands string[]
|
||||
local found = false
|
||||
for _, c in ipairs(commands) do
|
||||
if vim.fn.executable(c) == 1 then
|
||||
name = c
|
||||
found = true
|
||||
end
|
||||
result[name] = { found }
|
||||
end
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
---@param editor_variable? {global: boolean}
|
||||
---@param values? {[1]:any, [2]:any}
|
||||
---@param option string
|
||||
function M.toggle(option, editor_variable, values)
|
||||
if values then
|
||||
if not editor_variable then
|
||||
if vim.deep_equal(vim.opt_local[option]:get(), values[1]) then
|
||||
vim.opt_local[option] = values[2]
|
||||
else
|
||||
vim.opt_local[option] = values[1]
|
||||
end
|
||||
vim.notify(
|
||||
"set editor option "
|
||||
.. option
|
||||
.. " to "
|
||||
.. tostring(vim.opt_local[option]:get()),
|
||||
vim.log.levels.INFO,
|
||||
{ title = "toggle editor option" }
|
||||
)
|
||||
else
|
||||
if not editor_variable.global then
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
if vim.b[bufnr][option] == values[1] then
|
||||
vim.b[bufnr][option] = values[2]
|
||||
else
|
||||
--if option is unset or nil
|
||||
vim.b[bufnr][option] = values[1]
|
||||
end
|
||||
--:h debug.getinfo() or lua_getinfo() to get information about a function
|
||||
vim.notify(
|
||||
"set option "
|
||||
.. option
|
||||
.. " to "
|
||||
.. tostring(vim.b[bufnr][option]),
|
||||
vim.log.levels.INFO,
|
||||
{
|
||||
title = "toggle local option",
|
||||
}
|
||||
)
|
||||
else
|
||||
if vim.g[option] == values[1] then
|
||||
vim.g[option] = values[2]
|
||||
else
|
||||
--if option is unset or nil
|
||||
vim.g[option] = values[1]
|
||||
end
|
||||
vim.notify(
|
||||
"set global option "
|
||||
.. option
|
||||
.. " to "
|
||||
.. tostring(vim.g[option]),
|
||||
vim.log.levels.INFO,
|
||||
{
|
||||
title = "toggle global option",
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
else
|
||||
if not editor_variable then
|
||||
vim.opt_local[option] = not vim.opt_local[option]:get()
|
||||
vim.notify(
|
||||
"set editor option "
|
||||
.. option
|
||||
.. " to "
|
||||
.. tostring(vim.opt_local[option]:get()),
|
||||
vim.log.levels.INFO,
|
||||
{
|
||||
title = "toggle editor option",
|
||||
}
|
||||
)
|
||||
else
|
||||
if not editor_variable.global then
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
vim.b[bufnr][option] = not vim.b[bufnr][option] and true
|
||||
or false
|
||||
vim.notify(
|
||||
"set option "
|
||||
.. option
|
||||
.. " to "
|
||||
.. tostring(vim.b[bufnr][option]),
|
||||
vim.log.levels.INFO,
|
||||
{
|
||||
title = "toggle local option",
|
||||
}
|
||||
)
|
||||
else
|
||||
vim.g[option] = not vim.g[option]
|
||||
vim.notify(
|
||||
"set global option "
|
||||
.. option
|
||||
.. " to "
|
||||
.. tostring(vim.g[option]),
|
||||
vim.log.levels.INFO,
|
||||
{
|
||||
title = "toggle global option",
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---@param fn fun()
|
||||
function M.on_very_lazy(fn)
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
group = vim.api.nvim_create_augroup("Lazy", { clear = true }),
|
||||
pattern = "VeryLazy",
|
||||
callback = function()
|
||||
fn()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
---@param modules string[]
|
||||
--modules like "autocmds" | "options" | "keymaps"
|
||||
M.lazy_load = function(modules)
|
||||
-- when no file is opened at startup
|
||||
if vim.fn.argc(-1) == 0 then
|
||||
-- autocmds and keymaps can wait to load
|
||||
-- always load lazyvim, then user file
|
||||
M.on_very_lazy(function()
|
||||
for i = 1, #modules do
|
||||
require(modules[i])
|
||||
end
|
||||
end)
|
||||
else
|
||||
-- load them now so they affect the opened buffers
|
||||
for i = 1, #modules do
|
||||
require(modules[i])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
---@param on_attach fun(client, bufnr)
|
||||
function M.on_attach(on_attach)
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
callback = function(args)
|
||||
local bufnr = args.buf
|
||||
local client = vim.lsp.get_client_by_id(args.data.client_id)
|
||||
on_attach(client, bufnr)
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
---@param plugin string
|
||||
function M.has(plugin)
|
||||
if package.loaded["lazy"] then
|
||||
return require("lazy.core.config").plugins[plugin] ~= nil
|
||||
else
|
||||
local plugin_name =
|
||||
vim.split(plugin, ".", { plain = true, trimempty = true })
|
||||
return package.loaded[plugin_name[1]] ~= nil
|
||||
end
|
||||
end
|
||||
|
||||
---@param description? string
|
||||
---@param opt table
|
||||
local function mdesc(opt, description)
|
||||
return vim.tbl_extend("force", opt, { desc = description })
|
||||
end
|
||||
|
||||
---@param mode string|table
|
||||
---@param lhs string
|
||||
---@param rhs string|function
|
||||
---@param opts? table
|
||||
---@param desc? string
|
||||
M.map = function(mode, lhs, rhs, opts, desc)
|
||||
opts = opts and opts or {}
|
||||
opts = mdesc(opts, desc)
|
||||
vim.keymap.set(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
M.augroup = function(name)
|
||||
return vim.api.nvim_create_augroup(name, { clear = true })
|
||||
end
|
||||
|
||||
return M
|
||||
@@ -0,0 +1,133 @@
|
||||
{
|
||||
"plugins": {
|
||||
"Comment.nvim": {
|
||||
"rev": "e30b7f2008e52442154b66f7c519bfd2f1e32acb",
|
||||
"src": "https://github.com/numToStr/Comment.nvim"
|
||||
},
|
||||
"blink.cmp": {
|
||||
"rev": "78336bc89ee5365633bcf754d93df01678b5c08f",
|
||||
"src": "https://github.com/saghen/blink.cmp",
|
||||
"version": "'v1.10.2'"
|
||||
},
|
||||
"clangd_extensions.nvim": {
|
||||
"rev": "78c2ecd659d54972be17aa6ba2deac3c53223b80",
|
||||
"src": "https://git.sr.ht/~chinmay/clangd_extensions.nvim"
|
||||
},
|
||||
"colorful-menu.nvim": {
|
||||
"rev": "b51a659459df8d078201aefc995db8175ed55e84",
|
||||
"src": "https://github.com/xzbdmw/colorful-menu.nvim"
|
||||
},
|
||||
"conform.nvim": {
|
||||
"rev": "086a40dc7ed8242c03be9f47fbcee68699cc2395",
|
||||
"src": "https://github.com/stevearc/conform.nvim"
|
||||
},
|
||||
"dashboard-nvim": {
|
||||
"rev": "62a10d9d55132b338dd742afc3c8a2683f3dd426",
|
||||
"src": "https://github.com/nvimdev/dashboard-nvim"
|
||||
},
|
||||
"friendly-snippets": {
|
||||
"rev": "6cd7280adead7f586db6fccbd15d2cac7e2188b9",
|
||||
"src": "https://github.com/rafamadriz/friendly-snippets"
|
||||
},
|
||||
"fzf-lua": {
|
||||
"rev": "5bf93b12f70c7cc89a2cc6ee026b82f111815be8",
|
||||
"src": "https://github.com/ibhagwan/fzf-lua"
|
||||
},
|
||||
"heirline-components.nvim": {
|
||||
"rev": "5ea9a16286c01b7c36d58c91903d1f8ff0b7ddeb",
|
||||
"src": "https://github.com/Zeioth/heirline-components.nvim"
|
||||
},
|
||||
"heirline.nvim": {
|
||||
"rev": "fae936abb5e0345b85c3a03ecf38525b0828b992",
|
||||
"src": "https://github.com/rebelot/heirline.nvim"
|
||||
},
|
||||
"indent-blankline.nvim": {
|
||||
"rev": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03",
|
||||
"src": "https://github.com/lukas-reineke/indent-blankline.nvim"
|
||||
},
|
||||
"lsp-document-highlight.nvim": {
|
||||
"rev": "8d49ad5b8b06ad496ff26e45879aaff37f2a210c",
|
||||
"src": "https://github.com/akioweh/lsp-document-highlight.nvim"
|
||||
},
|
||||
"lsp_lines.nvim": {
|
||||
"rev": "a92c755f182b89ea91bd8a6a2227208026f27b4d",
|
||||
"src": "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
|
||||
},
|
||||
"lspkind.nvim": {
|
||||
"rev": "c7274c48137396526b59d86232eabcdc7fed8a32",
|
||||
"src": "https://github.com/onsails/lspkind.nvim"
|
||||
},
|
||||
"lspsaga.nvim": {
|
||||
"rev": "562d9724e3869ffd1801c572dd149cc9f8d0cc36",
|
||||
"src": "https://github.com/nvimdev/lspsaga.nvim"
|
||||
},
|
||||
"mini.indentscope": {
|
||||
"rev": "e0601f75aa5137a5a13bb92a988c9a300f5bd3de",
|
||||
"src": "https://github.com/echasnovski/mini.indentscope"
|
||||
},
|
||||
"noice.nvim": {
|
||||
"rev": "7bfd942445fb63089b59f97ca487d605e715f155",
|
||||
"src": "https://github.com/folke/noice.nvim"
|
||||
},
|
||||
"nui.nvim": {
|
||||
"rev": "de740991c12411b663994b2860f1a4fd0937c130",
|
||||
"src": "https://github.com/MunifTanjim/nui.nvim"
|
||||
},
|
||||
"nvim-autopairs": {
|
||||
"rev": "59bce2eef357189c3305e25bc6dd2d138c1683f5",
|
||||
"src": "https://github.com/windwp/nvim-autopairs"
|
||||
},
|
||||
"nvim-lspconfig": {
|
||||
"rev": "8a9378a822719346a0288fa004dab302ca3c0a8f",
|
||||
"src": "https://github.com/neovim/nvim-lspconfig"
|
||||
},
|
||||
"nvim-notify": {
|
||||
"rev": "8701bece920b38ea289b457f902e2ad184131a5d",
|
||||
"src": "https://github.com/rcarriga/nvim-notify"
|
||||
},
|
||||
"nvim-web-devicons": {
|
||||
"rev": "c72328a5494b4502947a022fe69c0c47e53b6aa6",
|
||||
"src": "https://github.com/nvim-tree/nvim-web-devicons"
|
||||
},
|
||||
"oxocarbon.nvim": {
|
||||
"rev": "a7ba74849a00546a311f8c146320b433900393e7",
|
||||
"src": "https://github.com/nyoom-engineering/oxocarbon.nvim"
|
||||
},
|
||||
"plenary.nvim": {
|
||||
"rev": "74b06c6c75e4eeb3108ec01852001636d85a932b",
|
||||
"src": "https://github.com/nvim-lua/plenary.nvim"
|
||||
},
|
||||
"pretty_hover": {
|
||||
"rev": "a4212464431e534725e84357aae70a5311d7ea8c",
|
||||
"src": "https://github.com/Fildo7525/pretty_hover"
|
||||
},
|
||||
"teide.nvim": {
|
||||
"rev": "95041d1d78e786bd88be64bca3e1771f7b6236df",
|
||||
"src": "https://github.com/serhez/teide.nvim"
|
||||
},
|
||||
"telescope-fzf-native.nvim": {
|
||||
"rev": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c",
|
||||
"src": "https://github.com/nvim-telescope/telescope-fzf-native.nvim"
|
||||
},
|
||||
"telescope.nvim": {
|
||||
"rev": "f7c673b8e46e8f233ff581d3624a517d33a7e264",
|
||||
"src": "https://github.com/nvim-telescope/telescope.nvim"
|
||||
},
|
||||
"todo-comments.nvim": {
|
||||
"rev": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668",
|
||||
"src": "https://github.com/folke/todo-comments.nvim"
|
||||
},
|
||||
"tree-sitter-manager.nvim": {
|
||||
"rev": "fa63bc63ae08b661843d9976a43becfbd3daf76c",
|
||||
"src": "https://github.com/romus204/tree-sitter-manager.nvim"
|
||||
},
|
||||
"which-key.nvim": {
|
||||
"rev": "3aab2147e74890957785941f0c1ad87d0a44c15a",
|
||||
"src": "https://github.com/folke/which-key.nvim"
|
||||
},
|
||||
"zpack.nvim": {
|
||||
"rev": "d3cc74dcfa29a209665b9e2957a76b75f35e4f24",
|
||||
"src": "https://github.com/zuqini/zpack.nvim"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user