summaryrefslogtreecommitdiff
path: root/config/nvim-1/lua/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'config/nvim-1/lua/plugins')
-rwxr-xr-xconfig/nvim-1/lua/plugins/catppuccin/init.lua84
-rwxr-xr-xconfig/nvim-1/lua/plugins/lazy/init.lua17
-rwxr-xr-xconfig/nvim-1/lua/plugins/lazy/plugins.lua128
-rwxr-xr-xconfig/nvim-1/lua/plugins/lsp/init.lua120
-rwxr-xr-xconfig/nvim-1/lua/plugins/lualine/init.lua42
-rwxr-xr-xconfig/nvim-1/lua/plugins/nvim-tree/init.lua2
-rwxr-xr-xconfig/nvim-1/lua/plugins/render-markdown/init.lua139
-rwxr-xr-xconfig/nvim-1/lua/plugins/telescope/init.lua3
-rwxr-xr-xconfig/nvim-1/lua/plugins/treesitter/init.lua10
-rwxr-xr-xconfig/nvim-1/lua/plugins/whichkey/init.lua2
10 files changed, 547 insertions, 0 deletions
diff --git a/config/nvim-1/lua/plugins/catppuccin/init.lua b/config/nvim-1/lua/plugins/catppuccin/init.lua
new file mode 100755
index 0000000..29afa04
--- /dev/null
+++ b/config/nvim-1/lua/plugins/catppuccin/init.lua
@@ -0,0 +1,84 @@
+local colors = {
+ black = "#121212",
+ white = "#ffffff",
+ gray = "#7e7e7e",
+ light_gray = "#d0d0d0",
+ dark_gray = "#505050",
+ red = "#ff5c57",
+ green = "#5af78e",
+ yellow = "#f3f99d",
+ blue = "#57c7ff",
+ purple = "#d183e8",
+ cyan = "#9aedfe",
+}
+
+local highlights = {
+ Normal = { fg = colors.light_gray, bg = colors.black },
+ Comment = { fg = colors.gray, italic = true },
+ Constant = { fg = colors.blue },
+ String = { fg = colors.green },
+ Identifier = { fg = colors.blue },
+ Function = { fg = colors.purple },
+ Statement = { fg = colors.yellow },
+ PreProc = { fg = colors.cyan },
+ Type = { fg = colors.blue },
+ Special = { fg = colors.red },
+ Underlined = { fg = colors.white, underline = true },
+ Todo = { fg = colors.black, bg = colors.yellow, bold = true },
+
+ StatusLine = { fg = colors.white, bg = colors.dark_gray },
+ StatusLineNC = { fg = colors.light_gray, bg = colors.black },
+ NvimTreeNormal = { fg = colors.light_gray, bg = colors.black },
+ NvimTreeFolderName = { fg = colors.blue, bold = true },
+ NvimTreeOpenedFolderName = { fg = colors.green, bold = true },
+ NvimTreeRootFolder = { fg = colors.yellow, bold = true, underline = true },
+ NvimTreeFileIcon = { fg = colors.light_gray },
+ NvimTreeGitDirty = { fg = colors.red },
+ NvimTreeGitStaged = { fg = colors.green },
+ NvimTreeGitNew = { fg = colors.blue },
+ NvimTreeGitRenamed = { fg = colors.purple },
+ NvimTreeGitDeleted = { fg = colors.red },
+ CursorLine = { bg = colors.dark_gray },
+}
+
+for group, opts in pairs(highlights) do
+ vim.api.nvim_set_hl(0, group, opts)
+end
+
+require("lualine").setup({
+ options = {
+ theme = {
+ normal = {
+ a = { fg = colors.black, bg = colors.white, gui = "bold" },
+ b = { fg = colors.white, bg = colors.dark_gray },
+ c = { fg = colors.white, bg = colors.black },
+ },
+ inactive = {
+ a = { fg = colors.dark_gray, bg = colors.black, gui = "bold" },
+ b = { fg = colors.dark_gray, bg = colors.black },
+ c = { fg = colors.dark_gray, bg = colors.black },
+ },
+ },
+ },
+})
+
+require("nvim-tree").setup({
+ view = {
+ width = 30,
+ side = "left",
+ },
+ renderer = {
+ highlight_git = true,
+ root_folder_modifier = ":~",
+ icons = {
+ show = {
+ file = true,
+ folder = true,
+ git = true,
+ },
+ },
+ },
+ filters = {
+ dotfiles = false,
+ },
+})
diff --git a/config/nvim-1/lua/plugins/lazy/init.lua b/config/nvim-1/lua/plugins/lazy/init.lua
new file mode 100755
index 0000000..497cf69
--- /dev/null
+++ b/config/nvim-1/lua/plugins/lazy/init.lua
@@ -0,0 +1,17 @@
+local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
+if not vim.loop.fs_stat(lazypath) then
+ vim.fn.system({
+ "git",
+ "clone",
+ "--filter=blob:none",
+ "https://github.com/folke/lazy.nvim.git",
+ "--branch=stable",
+ lazypath,
+ })
+end
+vim.opt.rtp:prepend(lazypath)
+
+local lazy_plugins = require("plugins/lazy/plugins")
+
+require("lazy").setup(lazy_plugins)
+require("mason").setup()
diff --git a/config/nvim-1/lua/plugins/lazy/plugins.lua b/config/nvim-1/lua/plugins/lazy/plugins.lua
new file mode 100755
index 0000000..10da3ea
--- /dev/null
+++ b/config/nvim-1/lua/plugins/lazy/plugins.lua
@@ -0,0 +1,128 @@
+return {
+ {
+ "andweeb/presence.nvim",
+ "catppuccin/nvim",
+ --"morhetz/gruvbox",
+ "neovim/nvim-lspconfig",
+ "williamboman/mason.nvim",
+ {
+ "nvim-telescope/telescope.nvim",
+ tag = "0.1.5",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ },
+ {
+ "nvim-tree/nvim-tree.lua",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ },
+ {
+ "folke/todo-comments.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ opts = {},
+ },
+ {
+ "nvim-lualine/lualine.nvim",
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ },
+ {
+ "nvimtools/none-ls.nvim",
+ dependencies = {
+ "nvimtools/none-ls-extras.nvim",
+ },
+ },
+ {
+ "windwp/nvim-autopairs",
+ event = "InsertEnter",
+ },
+ {
+ "hrsh7th/nvim-cmp",
+ dependencies = {
+ "neovim/nvim-lspconfig",
+ "hrsh7th/cmp-nvim-lsp",
+ "hrsh7th/cmp-nvim-lua",
+ "hrsh7th/cmp-buffer",
+ "hrsh7th/cmp-path",
+ "hrsh7th/cmp-cmdline",
+ "hrsh7th/cmp-vsnip",
+ "hrsh7th/vim-vsnip",
+ },
+ },
+ {
+ "ray-x/lsp_signature.nvim",
+ event = "VeryLazy",
+ },
+ "nvim-treesitter/nvim-treesitter",
+ "f3fora/cmp-spell",
+ {
+ "debugloop/telescope-undo.nvim",
+ dependencies = {
+ {
+ "nvim-telescope/telescope.nvim",
+ dependencies = { "nvim-lua/plenary.nvim" },
+ },
+ },
+ },
+ {
+ "chomosuke/typst-preview.nvim",
+ lazy = false,
+ version = "1.*",
+ opts = {},
+ },
+ {
+ "MeanderingProgrammer/render-markdown.nvim",
+ dependencies = {
+ "nvim-treesitter/nvim-treesitter",
+ "nvim-mini/mini.nvim",
+ },
+ opts = {},
+ },
+ "sitiom/nvim-numbertoggle",
+ "mluders/comfy-line-numbers.nvim",
+ {
+ "folke/which-key.nvim",
+ event = "VeryLazy",
+ init = function()
+ vim.o.timeout = true
+ vim.o.timeoutlen = 300
+ end,
+ },
+ {
+ "folke/twilight.nvim",
+ opts = {
+ dimming = {
+ alpha = 0.35,
+ color = { "Normal" },
+ term_bg = "#282828",
+ inactive = false,
+ },
+ context = 15,
+ treesitter = true,
+ expand = {
+ "function",
+ "method",
+ "table",
+ "if_statement",
+ },
+ exclude = {
+ "md",
+ },
+ },
+ },
+ "nguyenvukhang/nvim-toggler",
+ "alvan/vim-closetag",
+ "norcalli/nvim-colorizer.lua",
+ {
+ "numtostr/fterm.nvim",
+ border = "double",
+ dimensions = {
+ height = 0.9,
+ width = 0.9,
+ },
+ },
+ {
+ "bluz71/vim-moonfly-colors",
+ name = "moonfly",
+ lazy = false,
+ priority = 1000,
+ },
+ },
+}
diff --git a/config/nvim-1/lua/plugins/lsp/init.lua b/config/nvim-1/lua/plugins/lsp/init.lua
new file mode 100755
index 0000000..1785d51
--- /dev/null
+++ b/config/nvim-1/lua/plugins/lsp/init.lua
@@ -0,0 +1,120 @@
+local lsp = require("lspconfig")
+local fmt = require("null-ls")
+local cmp = require("cmp")
+
+require("nvim-autopairs").setup({})
+require("lsp_signature").setup({ hint_enable = false })
+
+local augroup = vim.api.nvim_create_augroup("LspFormatting", {})
+fmt.setup({
+ sources = {
+ fmt.builtins.formatting.clang_format,
+ require("none-ls.formatting.rustfmt"),
+ fmt.builtins.formatting.stylua,
+ fmt.builtins.formatting.gofmt,
+ },
+ on_attach = function(client, bufnr)
+ if client.supports_method("textDocument/formatting") then
+ vim.api.nvim_clear_autocmds({ group = augroup, buffer = bufnr })
+ vim.api.nvim_create_autocmd("BufWritePre", {
+ group = augroup,
+ buffer = bufnr,
+ callback = function()
+ vim.lsp.buf.format({ async = false })
+ end,
+ })
+ end
+ end,
+})
+
+cmp.setup({
+ snippet = {
+ expand = function(args)
+ vim.fn["vsnip#anonymous"](args.body)
+ end,
+ },
+ mapping = cmp.mapping.preset.insert({
+ ["<C-b>"] = cmp.mapping.scroll_docs(-4),
+ ["<C-f>"] = cmp.mapping.scroll_docs(4),
+ ["<C-Space>"] = cmp.mapping.complete(),
+ ["<C-e>"] = cmp.mapping.abort(),
+ ["<CR>"] = cmp.mapping.confirm({ select = true }),
+ }),
+ window = { completion = cmp.config.window.bordered(), documentation = cmp.config.window.bordered() },
+ sources = cmp.config.sources({
+ { name = "nvim_lsp" },
+ { name = "vsnip" },
+ { name = "spell" },
+ }, {
+ { name = "buffer" },
+ { name = "nvim_lua" },
+ }),
+})
+
+local capabilities = require("cmp_nvim_lsp").default_capabilities()
+
+lsp.html.setup({
+ cmd = { "vscode-html-language-server", "--stdio" },
+ capabilities = capabilities,
+ init_options = {
+ configurationSection = { "html", "css", "javascript" },
+ embeddedLanguages = { css = true, javascript = true },
+ provideFormatter = true,
+ },
+ settings = {
+ html = {
+ format = {
+ wrapLineLength = 120,
+ wrapAttributes = "auto",
+ contentUnformatted = "pre,code,textarea",
+ },
+ hover = { documentation = true, references = true },
+ },
+ },
+})
+
+lsp.cssls.setup({
+ capabilities = capabilities,
+ settings = { css = { validate = true }, scss = { validate = true }, less = { validate = true } },
+})
+
+lsp.ts_ls.setup({
+ capabilities = capabilities,
+ on_attach = function(client)
+ client.server_capabilities.documentFormattingProvider = false
+ end,
+})
+
+lsp.rust_analyzer.setup({ capabilities = capabilities })
+
+local clangd_capabilities = vim.deepcopy(capabilities)
+clangd_capabilities["offsetEncoding"] = "utf-8"
+lsp.clangd.setup({
+ cmd = { "clangd", "--background-index", "--function-arg-placeholders=0", "-j=12", "--clang-tidy" },
+ capabilities = clangd_capabilities,
+ init_options = { documentFormatting = true },
+})
+
+lsp.pyright.setup({ capabilities = capabilities })
+lsp.gopls.setup({ capabilities = capabilities })
+lsp.asm_lsp.setup({ capabilities = capabilities })
+lsp.zls.setup({ capabilities = capabilities })
+lsp.jdtls.setup({ capabilities = capabilities })
+lsp.tinymist.setup({ capabilities = capabilities })
+
+lsp.lua_ls.setup({
+ on_init = function(client)
+ local path = client.workspace_folders[1].name
+ if not vim.loop.fs_stat(path .. "/.luarc.json") and not vim.loop.fs_stat(path .. "/.luarc.jsonc") then
+ client.config.settings = vim.tbl_deep_extend("force", client.config.settings, {
+ Lua = {
+ runtime = { version = "LuaJIT" },
+ workspace = { checkThirdParty = false, library = { vim.env.VIMRUNTIME } },
+ },
+ })
+ client.notify("workspace/didChangeConfiguration", { settings = client.config.settings })
+ end
+ return true
+ end,
+ capabilities = capabilities,
+})
diff --git a/config/nvim-1/lua/plugins/lualine/init.lua b/config/nvim-1/lua/plugins/lualine/init.lua
new file mode 100755
index 0000000..8de1ba9
--- /dev/null
+++ b/config/nvim-1/lua/plugins/lualine/init.lua
@@ -0,0 +1,42 @@
+local lualine = require("lualine")
+
+lualine.setup({
+ options = {
+ icons_enabled = true,
+ theme = "auto",
+ component_separators = { left = "|", right = "|" },
+ section_separators = { left = "", right = "" },
+ disabled_filetypes = {
+ statusline = {},
+ winbar = {},
+ },
+ ignore_focus = {},
+ always_divide_middle = true,
+ globalstatus = false,
+ refresh = {
+ statusline = 1000,
+ tabline = 1000,
+ winbar = 1000,
+ },
+ },
+ sections = {
+ lualine_a = { "mode" },
+ lualine_b = { "branch", "diff", "diagnostics" },
+ lualine_c = { "filename" },
+ lualine_x = { "encoding", "fileformat", "filetype" },
+ lualine_y = {},
+ lualine_z = { "location" },
+ },
+ inactive_sections = {
+ lualine_a = {},
+ lualine_b = {},
+ lualine_c = { "filename" },
+ lualine_x = { "location" },
+ lualine_y = {},
+ lualine_z = {},
+ },
+ tabline = {},
+ winbar = {},
+ inactive_winbar = {},
+ extensions = {},
+})
diff --git a/config/nvim-1/lua/plugins/nvim-tree/init.lua b/config/nvim-1/lua/plugins/nvim-tree/init.lua
new file mode 100755
index 0000000..c7174f7
--- /dev/null
+++ b/config/nvim-1/lua/plugins/nvim-tree/init.lua
@@ -0,0 +1,2 @@
+local tree = require("nvim-tree")
+tree.setup() \ No newline at end of file
diff --git a/config/nvim-1/lua/plugins/render-markdown/init.lua b/config/nvim-1/lua/plugins/render-markdown/init.lua
new file mode 100755
index 0000000..ab078ce
--- /dev/null
+++ b/config/nvim-1/lua/plugins/render-markdown/init.lua
@@ -0,0 +1,139 @@
+require("render-markdown").setup({
+ link = {
+ -- Turn on / off inline link icon rendering.
+ enabled = true,
+ -- Additional modes to render links.
+ render_modes = false,
+ -- How to handle footnote links, start with a '^'.
+ footnote = {
+ -- Turn on / off footnote rendering.
+ enabled = true,
+ -- Replace value with superscript equivalent.
+ superscript = true,
+ -- Added before link content.
+ prefix = "",
+ -- Added after link content.
+ suffix = "",
+ },
+ -- Inlined with 'image' elements.
+ image = "󰥶 ",
+ -- Inlined with 'email_autolink' elements.
+ email = "󰀓 ",
+ -- Fallback icon for 'inline_link' and 'uri_autolink' elements.
+ hyperlink = "󰌹 ",
+ -- Applies to the inlined icon as a fallback.
+ highlight = "RenderMarkdownLink",
+ -- Applies to WikiLink elements.
+ wiki = {
+ icon = "󱗖 ",
+ body = function()
+ return nil
+ end,
+ highlight = "RenderMarkdownWikiLink",
+ },
+ -- Define custom destination patterns so icons can quickly inform you of what a link
+ -- contains. Applies to 'inline_link', 'uri_autolink', and wikilink nodes. When multiple
+ -- patterns match a link the one with the longer pattern is used.
+ -- The key is for healthcheck and to allow users to change its values, value type below.
+ -- | pattern | matched against the destination text |
+ -- | icon | gets inlined before the link text |
+ -- | kind | optional determines how pattern is checked |
+ -- | | pattern | @see :h lua-patterns, is the default if not set |
+ -- | | suffix | @see :h vim.endswith() |
+ -- | priority | optional used when multiple match, uses pattern length if empty |
+ -- | highlight | optional highlight for 'icon', uses fallback highlight if empty |
+ custom = {
+ web = { pattern = "^http", icon = "󰖟 " },
+ github = { pattern = "github%.com", icon = "󰊤 " },
+ gitlab = { pattern = "gitlab%.com", icon = "󰮠 " },
+ stackoverflow = { pattern = "stackoverflow%.com", icon = "󰓌 " },
+ wikipedia = { pattern = "wikipedia%.org", icon = "󰖬 " },
+ youtube = { pattern = "youtube%.com", icon = "󰗃 " },
+ },
+ },
+ callout = {
+ -- Callouts are a special instance of a 'block_quote' that start with a 'shortcut_link'.
+ -- The key is for healthcheck and to allow users to change its values, value type below.
+ -- | raw | matched against the raw text of a 'shortcut_link', case insensitive |
+ -- | rendered | replaces the 'raw' value when rendering |
+ -- | highlight | highlight for the 'rendered' text and quote markers |
+ -- | quote_icon | optional override for quote.icon value for individual callout |
+ -- | category | optional metadata useful for filtering |
+
+ note = { raw = "[!NOTE]", rendered = "󰋽 Note", highlight = "RenderMarkdownInfo" },
+ tip = { raw = "[!TIP]", rendered = "󰌶 Tip", highlight = "RenderMarkdownSuccess" },
+ important = { raw = "[!IMPORTANT]", rendered = "󰅾 Important", highlight = "RenderMarkdownHint" },
+ warning = { raw = "[!WARNING]", rendered = "󰀪 Warning", highlight = "RenderMarkdownWarn" },
+ caution = { raw = "[!CAUTION]", rendered = "󰳦 Caution", highlight = "RenderMarkdownError" },
+ abstract = { raw = "[!ABSTRACT]", rendered = "󰨸 Abstract", highlight = "RenderMarkdownInfo" },
+ summary = { raw = "[!SUMMARY]", rendered = "󰨸 Summary", highlight = "RenderMarkdownInfo" },
+ tldr = { raw = "[!TLDR]", rendered = "󰨸 Tldr", highlight = "RenderMarkdownInfo" },
+ info = { raw = "[!INFO]", rendered = "󰋽 Info", highlight = "RenderMarkdownInfo" },
+ todo = { raw = "[!TODO]", rendered = "󰗡 Todo", highlight = "RenderMarkdownInfo" },
+ hint = { raw = "[!HINT]", rendered = "󰌶 Hint", highlight = "RenderMarkdownSuccess" },
+ success = { raw = "[!SUCCESS]", rendered = "󰄬 Success", highlight = "RenderMarkdownSuccess" },
+ check = { raw = "[!CHECK]", rendered = "󰄬 Check", highlight = "RenderMarkdownSuccess" },
+ done = { raw = "[!DONE]", rendered = "󰄬 Done", highlight = "RenderMarkdownSuccess" },
+ question = { raw = "[!QUESTION]", rendered = "󰘥 Question", highlight = "RenderMarkdownWarn" },
+ help = { raw = "[!HELP]", rendered = "󰘥 Help", highlight = "RenderMarkdownWarn" },
+ faq = { raw = "[!FAQ]", rendered = "󰘥 Faq", highlight = "RenderMarkdownWarn" },
+ attention = { raw = "[!ATTENTION]", rendered = "󰀪 Attention", highlight = "RenderMarkdownWarn" },
+ failure = { raw = "[!FAILURE]", rendered = "󰅖 Failure", highlight = "RenderMarkdownError" },
+ fail = { raw = "[!FAIL]", rendered = "󰅖 Fail", highlight = "RenderMarkdownError" },
+ missing = { raw = "[!MISSING]", rendered = "󰅖 Missing", highlight = "RenderMarkdownError" },
+ danger = { raw = "[!DANGER]", rendered = "󱐌 Danger", highlight = "RenderMarkdownError" },
+ error = { raw = "[!ERROR]", rendered = "󱐌 Error", highlight = "RenderMarkdownError" },
+ bug = { raw = "[!BUG]", rendered = "󰨰 Bug", highlight = "RenderMarkdownError" },
+ example = { raw = "[!EXAMPLE]", rendered = "󰉹 Example", highlight = "RenderMarkdownHint" },
+ quote = { raw = "[!QUOTE]", rendered = "󱆨 Quote", highlight = "RenderMarkdownQuote" },
+ cite = { raw = "[!CITE]", rendered = "󱆨 Cite", highlight = "RenderMarkdownQuote" },
+ },
+ checkbox = {
+ enabled = true,
+ render_modes = false,
+ bullet = false,
+ right_pad = 1,
+ unchecked = {
+ icon = "󰄱 ",
+ highlight = "RenderMarkdownUnchecked",
+ scope_highlight = nil,
+ },
+ checked = {
+ icon = "󰱒 ",
+ highlight = "RenderMarkdownChecked",
+ scope_highlight = nil,
+ },
+ custom = {
+ todo = { raw = "[-]", rendered = "󰥔 ", highlight = "RenderMarkdownTodo", scope_highlight = nil },
+ },
+ },
+ bullet = {
+ enabled = true,
+ render_modes = false,
+ icons = { "●", "○", "◆", "◇" },
+ ordered_icons = function(ctx)
+ local value = vim.trim(ctx.value)
+ local index = tonumber(value:sub(1, #value - 1))
+ return ("%d."):format(index > 1 and index or ctx.index)
+ end,
+ left_pad = 0,
+ right_pad = 0,
+ highlight = "RenderMarkdownBullet",
+ scope_highlight = {},
+ },
+ quote = { icon = "▋" },
+ anti_conceal = {
+ enabled = true,
+ -- Which elements to always show, ignoring anti conceal behavior. Values can either be
+ -- booleans to fix the behavior or string lists representing modes where anti conceal
+ -- behavior will be ignored. Valid values are:
+ -- head_icon, head_background, head_border, code_language, code_background, code_border,
+ -- dash, bullet, check_icon, check_scope, quote, table_border, callout, link, sign
+ ignore = {
+ code_background = true,
+ sign = true,
+ },
+ above = 0,
+ below = 0,
+ },
+})
diff --git a/config/nvim-1/lua/plugins/telescope/init.lua b/config/nvim-1/lua/plugins/telescope/init.lua
new file mode 100755
index 0000000..2cb0f77
--- /dev/null
+++ b/config/nvim-1/lua/plugins/telescope/init.lua
@@ -0,0 +1,3 @@
+local tel = require("telescope")
+tel.setup({})
+tel.load_extension("undo")
diff --git a/config/nvim-1/lua/plugins/treesitter/init.lua b/config/nvim-1/lua/plugins/treesitter/init.lua
new file mode 100755
index 0000000..192cab7
--- /dev/null
+++ b/config/nvim-1/lua/plugins/treesitter/init.lua
@@ -0,0 +1,10 @@
+local ts = require("nvim-treesitter.configs")
+
+ts.setup({
+ ensure_installed = { "c", "cpp", "lua", "go", "gomod", "gowork", "gosum", "rust", "python" },
+ auto_install = true,
+ sync_install = true,
+ highlight = {
+ enable = true
+ }
+})
diff --git a/config/nvim-1/lua/plugins/whichkey/init.lua b/config/nvim-1/lua/plugins/whichkey/init.lua
new file mode 100755
index 0000000..e6b9906
--- /dev/null
+++ b/config/nvim-1/lua/plugins/whichkey/init.lua
@@ -0,0 +1,2 @@
+local wk = require("which-key")
+wk.setup({})