diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48b8bf9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor/ diff --git a/LICENSE b/LICENSE deleted file mode 100644 index fdddb29..0000000 --- a/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to diff --git a/README.md b/README.md deleted file mode 100644 index dc0deaa..0000000 --- a/README.md +++ /dev/null @@ -1,9 +0,0 @@ -**This repo is supposed to used as config by NvChad users!** - -- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. -- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` -- So you can delete the .git from this repo ( when you clone it locally ) or fork it :) - -# Credits - -1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! diff --git a/init.lua b/init.lua index 0fda20c..727cc08 100644 --- a/init.lua +++ b/init.lua @@ -1,37 +1 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/" -vim.g.mapleader = " " - --- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" - -if not vim.uv.fs_stat(lazypath) then - local repo = "https://github.com/folke/lazy.nvim.git" - vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } -end - -vim.opt.rtp:prepend(lazypath) - -local lazy_config = require "configs.lazy" - --- load plugins -require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - }, - - { import = "plugins" }, -}, lazy_config) - --- load theme -dofile(vim.g.base46_cache .. "defaults") -dofile(vim.g.base46_cache .. "statusline") - -require "options" -require "nvchad.autocmds" - -vim.schedule(function() - require "mappings" -end) +require "config.lazy" diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..af094d7 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,32 @@ +{ + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "colorful-menu.nvim": { "branch": "master", "commit": "0041037582353a2101f0ba8bd8cae21c064921dc" }, + "conform.nvim": { "branch": "master", "commit": "db8a4a9edb217067b1d7a2e0362c74bfe9cc944d" }, + "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lsp_signature.nvim": { "branch": "master", "commit": "8b681c86b0bd7f932cd91987983d91497e43d83f" }, + "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mellifluous.nvim": { "branch": "main", "commit": "9add9975a067e448da077dab92b70473aab41a76" }, + "mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" }, + "mini.nvim": { "branch": "main", "commit": "2d873a0eaa9f37b105c7751bb0a2e30eb448120d" }, + "nordic.nvim": { "branch": "main", "commit": "62acfd4eb008153180670daf81874eb47dd37739" }, + "nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" }, + "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, + "nvim-lspconfig": { "branch": "master", "commit": "8a1529e46eef5efc86c34c8d9bdd313abc2ecba0" }, + "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, + "nvim-treesitter": { "branch": "master", "commit": "8b79cddc708cb8549562f0101f7f509ad7cebf97" }, + "nvim-web-devicons": { "branch": "master", "commit": "ab4cfee554e501f497bce0856788d43cf2eb93d7" }, + "oil.nvim": { "branch": "master", "commit": "548587d68b55e632d8a69c92cefd981f360634fa" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, + "vesper.nvim": { "branch": "main", "commit": "4e96a753a964192b5904598e64366a93eef5449d" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } +} diff --git a/lua/chadrc.lua b/lua/chadrc.lua deleted file mode 100644 index 29b83c6..0000000 --- a/lua/chadrc.lua +++ /dev/null @@ -1,24 +0,0 @@ --- This file needs to have same structure as nvconfig.lua --- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua --- Please read that file to know all available options :( - ----@type ChadrcConfig -local M = {} - -M.base46 = { - theme = "onedark", - - -- hl_override = { - -- Comment = { italic = true }, - -- ["@comment"] = { italic = true }, - -- }, -} - --- M.nvdash = { load_on_startup = true } --- M.ui = { --- tabufline = { --- lazyload = false --- } ---} - -return M diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..942aebd --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,38 @@ +-- Bootstrap lazy.nvim +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system { "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath } + if vim.v.shell_error ~= 0 then + vim.api.nvim_echo({ + { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, + { out, "WarningMsg" }, + { "\nPress any key to exit..." }, + }, true, {}) + vim.fn.getchar() + os.exit(1) + end +end +vim.opt.rtp:prepend(lazypath) + +-- Make sure to setup `mapleader` and `maplocalleader` before +-- loading lazy.nvim so that mappings are correct. +-- This is also a good place to setup other settings (vim.opt) +vim.g.mapleader = "`" +vim.g.maplocalleader = "\\" + +require("config.settings").init() + +-- Setup lazy.nvim +require("lazy").setup { + spec = { + -- import your plugins + { import = "plugins" }, + }, + -- Configure any other settings here. See the documentation for more details. + -- colorscheme that will be used when installing plugins. + install = { colorscheme = { "habamax" } }, + -- automatically check for plugin updates + checker = { enabled = true }, + change_detection = { notify = false }, +} diff --git a/lua/config/settings.lua b/lua/config/settings.lua new file mode 100644 index 0000000..348859e --- /dev/null +++ b/lua/config/settings.lua @@ -0,0 +1,28 @@ +local m = {} + +m.init = function() + vim.opt.shiftwidth = 4 + vim.opt.softtabstop = 4 + vim.opt.tabstop = 4 + vim.opt.expandtab = true + + vim.opt.showmode = false + + vim.opt.hlsearch = false + vim.opt.incsearch = true + + vim.opt.termguicolors = true + + vim.opt.updatetime = 50 + + vim.opt.wrap = false + vim.opt.number = true + vim.opt.relativenumber = true + vim.opt.mouse = "" + + vim.opt.fillchars = { eob = " " } + + vim.o.clipboard = "unnamed" +end + +return m diff --git a/lua/configs/conform.lua b/lua/configs/conform.lua deleted file mode 100644 index 35ba6cf..0000000 --- a/lua/configs/conform.lua +++ /dev/null @@ -1,15 +0,0 @@ -local options = { - formatters_by_ft = { - lua = { "stylua" }, - -- css = { "prettier" }, - -- html = { "prettier" }, - }, - - -- format_on_save = { - -- -- These options will be passed to conform.format() - -- timeout_ms = 500, - -- lsp_fallback = true, - -- }, -} - -return options diff --git a/lua/configs/lazy.lua b/lua/configs/lazy.lua deleted file mode 100644 index cd170bd..0000000 --- a/lua/configs/lazy.lua +++ /dev/null @@ -1,47 +0,0 @@ -return { - defaults = { lazy = true }, - install = { colorscheme = { "nvchad" } }, - - ui = { - icons = { - ft = "", - lazy = "󰂠 ", - loaded = "", - not_loaded = "", - }, - }, - - performance = { - rtp = { - disabled_plugins = { - "2html_plugin", - "tohtml", - "getscript", - "getscriptPlugin", - "gzip", - "logipat", - "netrw", - "netrwPlugin", - "netrwSettings", - "netrwFileHandlers", - "matchit", - "tar", - "tarPlugin", - "rrhelper", - "spellfile_plugin", - "vimball", - "vimballPlugin", - "zip", - "zipPlugin", - "tutor", - "rplugin", - "syntax", - "synmenu", - "optwin", - "compiler", - "bugreport", - "ftplugin", - }, - }, - }, -} diff --git a/lua/configs/lspconfig.lua b/lua/configs/lspconfig.lua deleted file mode 100644 index 478df01..0000000 --- a/lua/configs/lspconfig.lua +++ /dev/null @@ -1,24 +0,0 @@ --- load defaults i.e lua_lsp -require("nvchad.configs.lspconfig").defaults() - -local lspconfig = require "lspconfig" - --- EXAMPLE -local servers = { "html", "cssls" } -local nvlsp = require "nvchad.configs.lspconfig" - --- lsps with default config -for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - on_attach = nvlsp.on_attach, - on_init = nvlsp.on_init, - capabilities = nvlsp.capabilities, - } -end - --- configuring single server, example: typescript --- lspconfig.ts_ls.setup { --- on_attach = nvlsp.on_attach, --- on_init = nvlsp.on_init, --- capabilities = nvlsp.capabilities, --- } diff --git a/lua/mappings.lua b/lua/mappings.lua deleted file mode 100644 index 783b78f..0000000 --- a/lua/mappings.lua +++ /dev/null @@ -1,10 +0,0 @@ -require "nvchad.mappings" - --- add yours here - -local map = vim.keymap.set - -map("n", ";", ":", { desc = "CMD enter command mode" }) -map("i", "jk", "") - --- map({ "n", "i", "v" }, "", " w ") diff --git a/lua/options.lua b/lua/options.lua deleted file mode 100644 index 738f20b..0000000 --- a/lua/options.lua +++ /dev/null @@ -1,6 +0,0 @@ -require "nvchad.options" - --- add yours here! - --- local o = vim.o --- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/lua/plugins/conform.lua b/lua/plugins/conform.lua new file mode 100644 index 0000000..4e7bd09 --- /dev/null +++ b/lua/plugins/conform.lua @@ -0,0 +1,12 @@ +return { + { + "stevearc/conform.nvim", + opts = { + formatters_by_ft = { + lua = { "stylua" }, + cpp = { "clang-format" }, + }, + format_on_save = { timeout_ms = 500, lsp_format = "fallback" }, + }, + }, +} diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua deleted file mode 100644 index 6474776..0000000 --- a/lua/plugins/init.lua +++ /dev/null @@ -1,25 +0,0 @@ -return { - { - "stevearc/conform.nvim", - -- event = 'BufWritePre', -- uncomment for format on save - opts = require "configs.conform", - }, - - -- These are some examples, uncomment them if you want to see them work! - { - "neovim/nvim-lspconfig", - config = function() - require "configs.lspconfig" - end, - }, - - -- { - -- "nvim-treesitter/nvim-treesitter", - -- opts = { - -- ensure_installed = { - -- "vim", "lua", "vimdoc", - -- "html", "css" - -- }, - -- }, - -- }, -} diff --git a/lua/plugins/keybinds.lua b/lua/plugins/keybinds.lua new file mode 100644 index 0000000..ce6f377 --- /dev/null +++ b/lua/plugins/keybinds.lua @@ -0,0 +1,42 @@ +return { + { + "folke/which-key.nvim", + event = "VeryLazy", + opts = {}, + keys = { + { + "\\", + function() + require("which-key").show { global = false } + end, + desc = "Buffer Local Keymaps (which-key)", + }, + { + "K", + ":m '<-2gv=gv", + mode = "v", + }, + { + "J", + ":m '>+1gv=gv", + mode = "v", + }, + { + "", + "zz", + desc = "Half page jump center", + }, + { + "", + "zz", + desc = "Half page jump center", + }, + { + "p", + '"_dP', + desc = "Stolen from prime", + mode = "x", + }, + }, + }, +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua new file mode 100644 index 0000000..5df3d71 --- /dev/null +++ b/lua/plugins/lspconfig.lua @@ -0,0 +1,204 @@ +return { + { "hrsh7th/cmp-nvim-lsp" }, + { "hrsh7th/cmp-cmdline" }, + { "hrsh7th/cmp-path" }, + { "hrsh7th/cmp-buffer" }, + { + "ray-x/lsp_signature.nvim", + event = "InsertEnter", + opts = {}, + }, + { + "folke/lazydev.nvim", + ft = "lua", -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + }, + }, + { + "williamboman/mason-lspconfig.nvim", + opts = { + ensure_installed = { "lua_ls", "rust_analyzer", "clangd", "zls" }, + handlers = { + function(server_name) + vim.opt.signcolumn = "yes" + local navic = require "nvim-navic" + + local on_attach = function(client, bufnr) + require("lsp_signature").on_attach({}, bufnr) + if client.server_capabilities.documentSymbolProvider then + navic.attach(client, bufnr) + end + end + + local capabilities = require("cmp_nvim_lsp").default_capabilities() + + require("lspconfig")[server_name].setup { + on_attach = on_attach, + capabilities = capabilities, + } + end, + }, + }, + }, + { + "onsails/lspkind.nvim", + config = function() + require("lspkind").init { preset = "codicons" } + end, + }, + { + "hrsh7th/nvim-cmp", + config = function() + local cmp = require "cmp" + local lspkind = require "lspkind" + + cmp.setup { + formatting = { + format = lspkind.cmp_format { + mode = "symbol", -- show only symbol annotations + maxwidth = { + menu = 50, -- leading text (labelDetails) + abbr = 50, -- actual suggestion item + }, + ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead (must define maxwidth first) + show_labelDetails = true, -- show labelDetails in menu. Disabled by default + + before = function(entry, vim_item) + local highlights_info = require("colorful-menu").cmp_highlights(entry) + + -- highlight_info is nil means we are missing the ts parser, it's + -- better to fallback to use default `vim_item.abbr`. What this plugin + -- offers is two fields: `vim_item.abbr_hl_group` and `vim_item.abbr`. + if highlights_info ~= nil then + vim_item.abbr_hl_group = highlights_info.highlights + vim_item.abbr = highlights_info.text + end + + return vim_item + end, + }, + }, + sources = { + { name = "nvim_lsp" }, + { + name = "lazydev", + group_index = 0, -- set group index to 0 to skip loading LuaLS completions + }, + }, + snippet = { + expand = function(args) + vim.snippet.expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert { + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm { select = true }, -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }, + } + + cmp.setup.cmdline({ "/", "?" }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = "buffer" }, + }, + }) + + -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). + cmp.setup.cmdline(":", { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = "path" }, + }, { + { name = "cmdline" }, + }), + matching = { disallow_symbol_nonprefix_matching = false }, + }) + end, + }, + { + "neovim/nvim-lspconfig", + lazy = false, + keys = { + { + "ca", + vim.lsp.buf.code_action, + desc = "LSP: [C]ode Action", + }, + { + "rr", + vim.lsp.buf.rename, + desc = "LSP rename", + }, + { + "lh", + vim.lsp.buf.hover, + desc = "[L]sp: Hover", + }, + }, + config = function() + vim.opt.signcolumn = "yes" + local navic = require "nvim-navic" + + local on_attach = function(client, bufnr) + if client.server_capabilities.documentSymbolProvider then + navic.attach(client, bufnr) + end + end + + vim.filetype.add { + extension = { + hlsl = "hlsl", + }, + } + + if not require("lspconfig.configs").hlsl_tools then + require("lspconfig.configs").hlsl_tools = { + default_config = { + cmd = "/home/hstasonis/.config/nvim/vendor/shader-language-server", + on_new_config = function(new_config, _) + new_config.cmd_env.LD_LIBRARY_PATH = "/home/hstasonis/.config/nvim/vendor" + end, + }, + single_file_support = true, + filetypes = { "hlsl" }, + } + end + + -- Set it up as usual + require("lspconfig.configs").hlsl_tools.setup { + on_attach = on_attach, + } + end, + }, + { + "williamboman/mason.nvim", + config = function() + require("mason").setup {} + end, + }, + { + "SmiteshP/nvim-navic", + config = function() + vim.o.winbar = "%{%v:lua.require'nvim-navic'.get_location()%}" + end, + }, + { + "j-hui/fidget.nvim", + opts = {}, + }, + { + "xzbdmw/colorful-menu.nvim", + config = function() + -- You don't need to set these options. + require("colorful-menu").setup {} + end, + }, +} diff --git a/lua/plugins/mini.lua b/lua/plugins/mini.lua new file mode 100644 index 0000000..1eb3011 --- /dev/null +++ b/lua/plugins/mini.lua @@ -0,0 +1,11 @@ +return { + { + "echasnovski/mini.nvim", + enabled = true, + config = function() + require("mini.statusline").setup() + require("mini.pairs").setup() + require("mini.ai").setup() + end, + }, +} diff --git a/lua/plugins/notes.lua b/lua/plugins/notes.lua new file mode 100644 index 0000000..6bc0f13 --- /dev/null +++ b/lua/plugins/notes.lua @@ -0,0 +1,13 @@ +return { + { + "stevearc/oil.nvim", + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + -- Optional dependencies + dependencies = { { "echasnovski/mini.icons", opts = {} } }, + -- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons + -- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations. + lazy = false, + }, +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..c919c00 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,106 @@ +return { + { + "folke/trouble.nvim", + keys = { + { + "", + function() + require("trouble").next { jump = true, skip_groups = true } + end, + }, + { + "", + function() + require("trouble").prev { jump = true, skip_groups = true } + end, + }, + }, + }, + { + "nvim-telescope/telescope.nvim", + tag = "0.1.8", + dependencies = { "nvim-lua/plenary.nvim" }, + keys = { + { + "dd", + function() + require("telescope.builtin").diagnostics() + end, + desc = "[D]iagnostics", + }, + { + "gd", + function() + require("telescope.builtin").lsp_definitions() + end, + desc = "LSP def", + }, + { + "gr", + function() + require("telescope.builtin").lsp_references() + end, + desc = "[L]SP, Find [R]eferences", + }, + { + "ws", + function() + require("telescope.builtin").lsp_workspace_symbols() + end, + desc = "LSP, [W]orkspace [S]ymbols", + }, + { + "gi", + function() + require("telescope.builtin").lsp_implementations() + end, + desc = "[L]sp, [I]mplementations", + }, + { + "gt", + function() + require("telescope.builtin").lsp_type_definitions() + end, + desc = "[L]SP, Type Definitions", + }, + { + "ff", + function() + local builtin = require "telescope.builtin" + builtin.find_files() + end, + desc = "Telescope: Find files", + }, + { + "fg", + function() + local builtin = require "telescope.builtin" + builtin.buffers() + end, + }, + { + "fg", + function() + local builtin = require "telescope.builtin" + builtin.live_grep() + end, + }, + }, + + config = function() + local builtin = require "telescope.builtin" + local open_with_trouble = require("trouble.sources.telescope").open + + -- Search with telescope and open with trouble + local telescope = require "telescope" + telescope.setup { + defaults = { + mappings = { + i = { [""] = open_with_trouble }, + n = { [""] = open_with_trouble }, + }, + }, + } + end, + }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..dadf1cf --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,28 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + config = function() + local configs = require "nvim-treesitter.configs" + + configs.setup { + ensure_installed = { + "c", + "lua", + "vim", + "vimdoc", + "query", + "markdown", + "json", + "javascript", + "cpp", + "hlsl", + "jsdoc", + }, + sync_install = false, + highlight = { enable = true }, + indent = { enable = true }, + } + end, + }, +} diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua new file mode 100644 index 0000000..8708284 --- /dev/null +++ b/lua/plugins/ui.lua @@ -0,0 +1,95 @@ +return { + { + "ramojus/mellifluous.nvim", + lazy = false, + priority = 1000, + enabled = true, + config = function() + require("mellifluous").setup { + colorset = "alduin", + } -- optional, see configuration section. + + vim.cmd [[ colorscheme mellifluous ]] + end, + }, + { + "datsfilipe/vesper.nvim", + lazy = false, + priority = 1000, + enabled = false, + config = function() + require("vesper").setup { + transparent = false, + } + + vim.cmd [[ colorscheme vesper ]] + end, + }, + { + "AlexvZyl/nordic.nvim", + lazy = false, + priority = 1000, + enabled = false, + config = function() + require("nordic").load { + bright_border = true, + } + end, + }, + { + "akinsho/bufferline.nvim", + version = "*", + lazy = false, + dependencies = { "nvim-tree/nvim-web-devicons", "datsfilipe/vesper.nvim" }, + keys = { + { + "[", + ":BufferLineCyclePrev", + desc = "Go back a buffer", + }, + { + "]", + ":BufferLineCycleNext", + desc = "Go to the next buffer", + }, + { + "-", + ":BufferLineCloseLeft", + desc = "Bufferline: Close left", + }, + { + "+", + ":BufferLineCloseOthers", + desc = "Bufferline: Close others", + }, + { + "_", + ":BufferLineCloseRight", + desc = "Bufferline: Close right", + }, + { + "=", + ":BufDel", + desc = "Close current buffer", + }, + }, + + opts = { + diagnostics = "nvim_lsp", + + diagnostics_indicator = function(count, level, diagnostics_dict, context) + local icon = level:match "error" and " " or " " + return " " .. icon .. count + end, + }, + config = function(_, opts) + require("bufferline").setup { + options = opts, + } + end, + }, + { + "ojroques/nvim-bufdel", + opts = {}, + }, +}