diff options
author | jack <[email protected]> | 2024-05-06 18:41:47 -0600 |
---|---|---|
committer | jack <[email protected]> | 2024-05-06 18:41:47 -0600 |
commit | 18ba5ac9572ed34c9f8eb62200a4b92554c2ef51 (patch) | |
tree | 336acb67ab32a1906b14d02076bf3b018cab1c3d | |
parent | ba63984a9fa53f5b86c6fbdc90a7e4992d6708d4 (diff) | |
download | dots-18ba5ac9572ed34c9f8eb62200a4b92554c2ef51.tar.gz dots-18ba5ac9572ed34c9f8eb62200a4b92554c2ef51.zip |
align neovim configuration
-rw-r--r-- | .config/mimeapps.list | 23 | ||||
-rw-r--r-- | .config/nvchad/chadrc.lua | 25 | ||||
-rw-r--r-- | .config/nvchad/configs/lspconfig.lua | 13 | ||||
-rw-r--r-- | .config/nvim/init.lua | 36 | ||||
-rw-r--r-- | .config/nvim/lazy-lock.json | 11 | ||||
-rw-r--r-- | .config/nvim/lua/chadrc.lua | 7 | ||||
-rw-r--r-- | .config/nvim/lua/configs/conform.lua | 25 | ||||
-rw-r--r-- | .config/nvim/lua/configs/lspconfig.lua | 14 | ||||
-rw-r--r-- | .config/nvim/lua/configs/vimtex.lua | 5 | ||||
-rw-r--r-- | .config/nvim/lua/mappings.lua | 1 | ||||
-rw-r--r-- | .config/nvim/lua/options.lua | 0 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 56 | ||||
-rw-r--r-- | .config/nvim/lua/plugins/init.lua | 9 | ||||
-rw-r--r-- | .gitignore | 3 |
14 files changed, 151 insertions, 77 deletions
diff --git a/.config/mimeapps.list b/.config/mimeapps.list deleted file mode 100644 index 56747328..00000000 --- a/.config/mimeapps.list +++ /dev/null @@ -1,23 +0,0 @@ -[Default Applications] -x-scheme-handler/http=userapp-Firefox-8OA7M2.desktop -x-scheme-handler/https=userapp-Firefox-8OA7M2.desktop -x-scheme-handler/chrome=userapp-Firefox-8OA7M2.desktop -text/html=userapp-Firefox-8OA7M2.desktop -application/x-extension-htm=userapp-Firefox-8OA7M2.desktop -application/x-extension-html=userapp-Firefox-8OA7M2.desktop -application/x-extension-shtml=userapp-Firefox-8OA7M2.desktop -application/xhtml+xml=userapp-Firefox-8OA7M2.desktop -application/x-extension-xhtml=userapp-Firefox-8OA7M2.desktop -application/x-extension-xht=userapp-Firefox-8OA7M2.desktop - -[Added Associations] -x-scheme-handler/http=userapp-Firefox-8OA7M2.desktop; -x-scheme-handler/https=userapp-Firefox-8OA7M2.desktop; -x-scheme-handler/chrome=userapp-Firefox-8OA7M2.desktop; -text/html=userapp-Firefox-8OA7M2.desktop; -application/x-extension-htm=userapp-Firefox-8OA7M2.desktop; -application/x-extension-html=userapp-Firefox-8OA7M2.desktop; -application/x-extension-shtml=userapp-Firefox-8OA7M2.desktop; -application/xhtml+xml=userapp-Firefox-8OA7M2.desktop; -application/x-extension-xhtml=userapp-Firefox-8OA7M2.desktop; -application/x-extension-xht=userapp-Firefox-8OA7M2.desktop; diff --git a/.config/nvchad/chadrc.lua b/.config/nvchad/chadrc.lua new file mode 100644 index 00000000..18198c60 --- /dev/null +++ b/.config/nvchad/chadrc.lua @@ -0,0 +1,25 @@ +---@type ChadrcConfig +local M = {} + +M.ui = { + theme = "everforest", + theme_toggle = { "everfoest", "everforest_light" }, + changed_themes = { + everforest = { + base_16 = { + base00 = "#272E33" + } + } + }, + statusline = { + theme = "vscode_colored" + }, + tabufline = { + lazyload = true + }, + nvdash = { + load_on_startup = true + } +} + +return M diff --git a/.config/nvchad/configs/lspconfig.lua b/.config/nvchad/configs/lspconfig.lua new file mode 100644 index 00000000..1f56f71f --- /dev/null +++ b/.config/nvchad/configs/lspconfig.lua @@ -0,0 +1,13 @@ +local on_attach = require("plugins.configs.lspconfig").on_attach +local capabilities = require("plugins.configs.lspconfig").capabilities + +local lspconfig = require "lspconfig" + +local servers = { "pylsp", "clangd", "cssls" } + +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + on_attach = on_attach, + capabilities = capabilities, + } +end diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 1152335b..7b9f5b1c 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,39 +1,39 @@ -vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +vim.g.base46_cache = vim.fn.stdpath("data") .. "/nvchad/base46/" vim.g.mapleader = " " -- bootstrap lazy and all plugins -local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.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 } + 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" +local lazy_config = require("configs.lazy") -- load plugins require("lazy").setup({ - { - "NvChad/NvChad", - lazy = false, - branch = "v2.5", - import = "nvchad.plugins", - config = function() - require "options" - end, - }, - - { import = "plugins" }, + { + "NvChad/NvChad", + lazy = false, + branch = "v2.5", + import = "nvchad.plugins", + config = function() + require("nvchad.options") + end, + }, + + { require("plugins") }, }, lazy_config) -- load theme dofile(vim.g.base46_cache .. "defaults") dofile(vim.g.base46_cache .. "statusline") -require "nvchad.autocmds" +require("nvchad.autocmds") vim.schedule(function() - require "mappings" + require("nvchad.mappings") end) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index e31033c9..4dfe9895 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,7 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "LuaSnip": { "branch": "master", "commit": "b152822e1a4bafb6bdf11a16cc26525cbd95ee00" }, - "NvChad": { "branch": "v2.5", "commit": "cbecbe6b4a9bed6eb344199cceaec2d2da4a379e" }, + "NvChad": { "branch": "v2.5", "commit": "156eeef8ecae812acd79d5eb58070d734a6202c6" }, "base46": { "branch": "v2.5", "commit": "bcc9ed2e88ef55b7e9d50b2f80f6a2d4b8080b1d" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, @@ -10,19 +10,20 @@ "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "conform.nvim": { "branch": "master", "commit": "12b3995537f52ba2810a9857e8ca256881febbda" }, "friendly-snippets": { "branch": "main", "commit": "fa36367422da5a38560892e3db6d090a635d9d41" }, - "gitsigns.nvim": { "branch": "main", "commit": "9cafac31a091267838e1e90fd6e083d37611f516" }, + "gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" }, "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, + "nvim-autopairs": { "branch": "master", "commit": "14e97371b2aab6ee70054c1070a123dfaa3e217e" }, "nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, "nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" }, "nvim-tree.lua": { "branch": "master", "commit": "64f61e4c913047a045ff90bd188dd3b54ee443cf" }, - "nvim-treesitter": { "branch": "master", "commit": "4ae2b452e9bd67ff618e3bb0e3488e49c98465e9" }, - "nvim-web-devicons": { "branch": "master", "commit": "475fbcfcb6ee7c35aa33a6b6207ebd4032791d87" }, + "nvim-treesitter": { "branch": "master", "commit": "4e21361e15b1d4147830c5fe571556eb1b14e6f9" }, + "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, "telescope.nvim": { "branch": "master", "commit": "fac83a556e7b710dc31433dec727361ca062dbe9" }, "ui": { "branch": "v2.5", "commit": "9c16efc915346c7bde5288ad94f0ea40a7267d31" }, + "vimtex": { "branch": "master", "commit": "137f5bded9ce554018c47f4c9c59cddb8ac9a455" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } }
\ No newline at end of file diff --git a/.config/nvim/lua/chadrc.lua b/.config/nvim/lua/chadrc.lua index 2f652973..200c8cf1 100644 --- a/.config/nvim/lua/chadrc.lua +++ b/.config/nvim/lua/chadrc.lua @@ -3,14 +3,17 @@ local M = {} M.ui = { theme = "everforest", - theme_toggle = "everforest_light", + theme_toggle = { "everforest", "everforest_light" }, changed_themes = { everforest = { base_16 = { - base00 = "#272E33" + base00 = "#272E33", }, }, }, + statusline = { theme = "vscode_colored" }, + tabufline = { lazyload = true }, + nvdash = { load_on_startup = true }, } return M diff --git a/.config/nvim/lua/configs/conform.lua b/.config/nvim/lua/configs/conform.lua index cb058e4f..838a8dad 100644 --- a/.config/nvim/lua/configs/conform.lua +++ b/.config/nvim/lua/configs/conform.lua @@ -1,16 +1,17 @@ local options = { - formatters_by_ft = { - c = { "clang-format" }, - cpp = { "clang-format" }, - python = { "black" }, - md = { "mdformat" }, - rs = { "rustfmt" }, - lua = { "stylua" }, - }, - format_on_save = { - timeout_ms = 500, - lsp_fallback = true, - }, + formatters_by_ft = { + python = { "black" }, + rust = { "rustfmt" }, + lua = { "stylua" }, + cpp = { "clang-format" }, + c = { "clang-format" }, + css = { "prettier" }, + html = { "prettier" }, + }, + format_on_save = { + timeout_ms = 500, + lsp_fallback = true, + }, } require("conform").setup(options) diff --git a/.config/nvim/lua/configs/lspconfig.lua b/.config/nvim/lua/configs/lspconfig.lua index 26c338fc..0ec3ca99 100644 --- a/.config/nvim/lua/configs/lspconfig.lua +++ b/.config/nvim/lua/configs/lspconfig.lua @@ -2,13 +2,13 @@ local on_attach = require("nvchad.configs.lspconfig").on_attach local on_init = require("nvchad.configs.lspconfig").on_init local capabilities = require("nvchad.configs.lspconfig").capabilities -local lspconfig = require "lspconfig" -local servers = { "pylsp", "clangd", "cssls" } +local lspconfig = require("lspconfig") +local servers = { "pylsp", "clangd", "cssls", "rust_analyzer", "marksman" } for _, lsp in ipairs(servers) do - lspconfig[lsp].setup { - on_attach = on_attach, - on_init = on_init, - capabilities = capabilities, - } + lspconfig[lsp].setup({ + on_attach = on_attach, + on_init = on_init, + capabilities = capabilities, + }) end diff --git a/.config/nvim/lua/configs/vimtex.lua b/.config/nvim/lua/configs/vimtex.lua new file mode 100644 index 00000000..c25558d5 --- /dev/null +++ b/.config/nvim/lua/configs/vimtex.lua @@ -0,0 +1,5 @@ +vim.g.tex_flavor='latex' +vim.g.vimtex_view_method='zathura' +vim.g.vimtex_quickfix_mode=0 +vim.opt.conceallevel = 1 +vim.g.tex_conceal='abdmg' diff --git a/.config/nvim/lua/mappings.lua b/.config/nvim/lua/mappings.lua deleted file mode 100644 index 133447a1..00000000 --- a/.config/nvim/lua/mappings.lua +++ /dev/null @@ -1 +0,0 @@ -require "nvchad.mappings" diff --git a/.config/nvim/lua/options.lua b/.config/nvim/lua/options.lua deleted file mode 100644 index e69de29b..00000000 --- a/.config/nvim/lua/options.lua +++ /dev/null diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua new file mode 100644 index 00000000..b473cc2d --- /dev/null +++ b/.config/nvim/lua/plugins.lua @@ -0,0 +1,56 @@ +return { + { + "stevearc/conform.nvim", + event = "BufWritePre", + config = function() + require("configs.conform") + end, + }, + { + "neovim/nvim-lspconfig", + config = function() + require("nvchad.configs.lspconfig").defaults() + require("configs.lspconfig") + end, + }, + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "lua-language-server", + "stylua", + "html-lsp", + "css-lsp", + "prettier", + "bash-language-server", + "marksman", + }, + }, + }, + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "vim", + "lua", + "vimdoc", + "html", + "css", + "python", + "rust", + "cpp", + "c", + "bash", + "html", + "markdown", + }, + }, + }, + { + "lervag/vimtex", + lazy = false, + config = function() + require("configs.vimtex") + end, + }, +} diff --git a/.config/nvim/lua/plugins/init.lua b/.config/nvim/lua/plugins/init.lua deleted file mode 100644 index d02616f9..00000000 --- a/.config/nvim/lua/plugins/init.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - { - "stevearc/conform.nvim", - event = 'BufWritePre', - config = function() - require "configs.conform" - end, - }, -} @@ -1,6 +1,8 @@ .cache .cargo .config/glib-2.0 +.config/mimeapps.list +.config/nvim .config/pulse .config/rclone .config/yadm @@ -15,6 +17,7 @@ .local/share/zoxide .local/state .mozilla +.npm .python_history .ssh .zcompdump |