Skip to content

Commit

Permalink
Major upgrade (#25)
Browse files Browse the repository at this point in the history
* testing phase

* feat(stuff): more lazy load stuff

* feat(stuff): which key spec update

* fix(bug): au group deletion

* feat(format): add auto format toggle

* fix(minor): change stuff

* fix: surround plugin

* fix: gitsigns preview hunk

* chore(style): apply stylua format

* chore(ci): ubuntu

* feat: remove deprecated surround.nvim with mini.surround

* fix: fixed the style of the dashboard

* fix: header padding

* update: themes

* update: themeing stuff

* update: use mini autopairs; add gpt func; add markdown style

* fix: delete unused configs; make class types unique in naming

* fix: double mappings

* fix: commented gc/gcc binds

* fix: readme gramma

* fix: termhl

* feat: add smear for ui swag

* chore: update nvim.log speed

Signed-off-by: Daniel Nehrig <[email protected]>

* feat: fix broken ts features textsubject and object

* fix: capabilities bug

* feat: add ts context

* feat: adding some plugins and ai key adjustment

- Mintty plugin added
- Timer plugin added
- Added configurable openai key

* fix: chatgpt config

* chore: fix formatting

Signed-off-by: Daniel Nehrig <[email protected]>

* chore: remove print

Signed-off-by: Daniel Nehrig <[email protected]>

* chore: remove error when outside colorschemes are loaded

Signed-off-by: Daniel Nehrig <[email protected]>

---------

Signed-off-by: Daniel Nehrig <[email protected]>
  • Loading branch information
danielnehrig authored Jan 6, 2025
1 parent b591c58 commit a099706
Show file tree
Hide file tree
Showing 48 changed files with 1,142 additions and 1,202 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
lint:
name: Luacheck
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- name: Setup
Expand Down
3 changes: 2 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ see `mappings.lua` for more info
_you are probably better of using these since they are community driven I'm the sole maintainer of this config_

- Lvim
- nvchad and module suite
- LazyVim
- nvchad UI style
- Theme based solution
- If the theme modules wouldn't be strictly written for nvchad I would have used their module
- base16
3 changes: 2 additions & 1 deletion ftplugin/java.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
require("config.plugins.configs.dap.attach").init()
local global = require("config.core.global")
local build_path_string = require("config.utils").build_path_string
local capabilities = require("config.plugins.configs.lspconfig").capabilities
local capabilities =
require("config.plugins.configs.lspconfig.capabilities").capabilities
local lsp = require("config.plugins.configs.lspconfig")
local map = vim.keymap.set

Expand Down
53 changes: 27 additions & 26 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" },
"ChatGPT.nvim": { "branch": "main", "commit": "5b6d296eefc75331e2ff9f0adcffbd7d27862dd6" },
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
"alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" },
"aurora": { "branch": "master", "commit": "af3e80a8ca4f9a6e3bd40e2ba12073c1d0041a81" },
"barbar.nvim": { "branch": "master", "commit": "a26bae6c51899db530de19ce3c2f4307e37a869e" },
"barbar.nvim": { "branch": "master", "commit": "40c176c9af7e9aefe3af9ec9d985a3edb50d66a3" },
"better-escape.nvim": { "branch": "master", "commit": "199dcc2643dec5d8dbdab4ec672cf405224dcb3b" },
"bionic.nvim": { "branch": "main", "commit": "3523383b6db41046a3d813ac65dd57e78e61babb" },
"block.nvim": { "branch": "main", "commit": "6fb969ab12579e58b9379aa51933cad4a466cf75" },
Expand All @@ -16,98 +15,100 @@
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"commented.nvim": { "branch": "master", "commit": "be322c5ef455800984705cee97490a5450f072bc" },
"copilot.vim": { "branch": "release", "commit": "87038123804796ca7af20d1b71c3428d858a9124" },
"crates.nvim": { "branch": "main", "commit": "8bf8358ee326d5d8c11dcd7ac0bcc9ff97dbc785" },
"crates.nvim": { "branch": "main", "commit": "bd35b13e94a292ee6e32c351e05ca2202dc9f070" },
"fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" },
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"git-conflict.nvim": { "branch": "main", "commit": "a1badcd070d176172940eb55d9d59029dad1c5a6" },
"github-nvim-theme": { "branch": "main", "commit": "24c8706c9ad26b944f5a76dea999dca8708f252e" },
"gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
"gruvqueen": { "branch": "master", "commit": "b79ed8b2bcc26e04fb7586f95a1e5d7a600e9cf8" },
"hlargs.nvim": { "branch": "main", "commit": "023021a330956eecf54e1015ecba55900d284365" },
"hlchunk.nvim": { "branch": "main", "commit": "5465dd33ade8676d63f6e8493252283060cd72ca" },
"indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" },
"hlargs.nvim": { "branch": "main", "commit": "a5a7fdacc0ac2f7ca9d241e0e059cb85f0e733bc" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
"lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" },
"lightspeed.nvim": { "branch": "main", "commit": "fcc72d8a4d5f4ebba62d8a3a0660f88f1b5c3b05" },
"live-server.nvim": { "branch": "main", "commit": "5fc8abb727827a09d0ce1b7757d0a4c7b5802b09" },
"lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" },
"lsp-status.nvim": { "branch": "master", "commit": "54f48eb5017632d81d0fd40112065f1d062d0629" },
"lspkind-nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "c6c686781f9841d855bf1b926e10aa5e19430a38" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"material.nvim": { "branch": "main", "commit": "c8ff153d2c2b22f8b2c9bcce0d741ab55c00cfed" },
"mini.icons": { "branch": "main", "commit": "6787321f70d674a481776b7cc2c781fb7002c644" },
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" },
"minty": { "branch": "main", "commit": "6dce9f097667862537823d515a0250ce58faab05" },
"mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
"neoconf.nvim": { "branch": "main", "commit": "daf26750632a8056511412d44d4f9f1240408828" },
"neoconf.nvim": { "branch": "main", "commit": "1e6c856d062b92ef201b35e0a4fc798331750118" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogen": { "branch": "main", "commit": "dd0301bfba1f83a3bc009b5430fce7aa3cee6941" },
"neogit": { "branch": "master", "commit": "9ea60f79e370d8f4847efc145e53afe4b0613fc1" },
"neotest": { "branch": "master", "commit": "0dccb5ebcf00de245e2060fa17822a9464f5c41a" },
"neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" },
"neotest-jest": { "branch": "main", "commit": "514fd4eae7da15fd409133086bb8e029b65ac43f" },
"neotest-rust": { "branch": "main", "commit": "e1cb22ecf0341fb894ef2ebde344389fe6e6fc8e" },
"no-neck-pain.nvim": { "branch": "main", "commit": "2a786bf7130cce20449885fb799f3c7f4ce93595" },
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" },
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
"nvim-autopairs": { "branch": "master", "commit": "b464658e9b880f463b9f7e6ccddd93fb0013f559" },
"nvim-bqf": { "branch": "main", "commit": "68d3c20f6bee49105dcfde3df1f7ec972529f2a3" },
"nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" },
"nvim-cmp-lua-latex-symbols": { "branch": "master", "commit": "0050e236dbebe12de35ecdc646fc1d9a6b0dbb29" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-coverage": { "branch": "main", "commit": "a939e425e363319d952a6c35fb3f38b34041ded2" },
"nvim-dap": { "branch": "master", "commit": "ffb077e65259f13be096ea6d603e3575a76b214a" },
"nvim-dap": { "branch": "master", "commit": "0e673accbb512e1e191dfb4fecea89cc38c1bcdd" },
"nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" },
"nvim-dap-ui": { "branch": "master", "commit": "e94d98649dccb6a3884b66aabc2e07beb279e535" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" },
"nvim-jdtls": { "branch": "master", "commit": "8f14aa1922ee5491ded1079a6576fae834535658" },
"nvim-lspconfig": { "branch": "master", "commit": "8b15a1a597a59f4f5306fad9adfe99454feab743" },
"nvim-jdtls": { "branch": "master", "commit": "266d0cb912bbe61d66b43c5e73db19a364380360" },
"nvim-lspconfig": { "branch": "master", "commit": "a8ef5e6e497b3ebeaaf35b939c07c211563b2e05" },
"nvim-metals": { "branch": "main", "commit": "e6b02c99161b43c67cfe1d6e5f9a9b9a0bb4701c" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-notify": { "branch": "master", "commit": "c3797193536711b5d8983975791c4b11dc35ab3a" },
"nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" },
"nvim-notify": { "branch": "master", "commit": "bd9cd51f9ef2f6326fc2bc9931d0718c1794e247" },
"nvim-pqf": { "branch": "main", "commit": "148ee2ca8b06d83fd9bf6f9b9497724ad39a07d6" },
"nvim-tree.lua": { "branch": "master", "commit": "68fc4c20f5803444277022c681785c5edd11916d" },
"nvim-treesitter": { "branch": "master", "commit": "4b222913486ec0a5983efa82b0649a2ab87cf1f0" },
"nvim-treesitter": { "branch": "master", "commit": "6935286b4ee3d938954e446d657eebee71b4d07a" },
"nvim-treesitter-context": { "branch": "master", "commit": "2bcf700b59bc92850ca83a1c02e86ba832e0fae0" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "a8d2844bba925d9450ef7ab215f3b054028288ca" },
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
"nvim-ufo": { "branch": "main", "commit": "32cb247b893a384f1888b9cd737264159ecf183c" },
"nvim-web-devicons": { "branch": "master", "commit": "4adeeaa7a32d46cf3b5833341358c797304f950a" },
"nvim-web-devicons": { "branch": "master", "commit": "5740b7382429d20b6ed0bbdb0694185af9507d44" },
"nvim-yati": { "branch": "main", "commit": "df3dc06076c6fe20a1dcd8643e712af5c252d042" },
"nvimux": { "branch": "master", "commit": "a2cd0cab0acf6c37d999e0cfd199a9fa126a8dcf" },
"one-small-step-for-vimkind": { "branch": "main", "commit": "5d2edc8937978585881d97a8fec4c2903fa4d72c" },
"orgmode.nvim": { "branch": "master", "commit": "bf657742f7cb56211f99946ff64f5f87d7d7f0d0" },
"overseer.nvim": { "branch": "master", "commit": "10ee48ff96c8d1049efb278ea4c8cf9f3b0e4326" },
"overseer.nvim": { "branch": "master", "commit": "8de110400643a02aeddf266b772a05f63db2e625" },
"package-info.nvim": { "branch": "master", "commit": "3de4f3569ce60e248707df042b72769b3ec343b8" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" },
"preview-swagger.nvim": { "branch": "master", "commit": "b2685918a51478e0c5d4790571e58188aa288512" },
"promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"refactoring.nvim": { "branch": "master", "commit": "2db6d378e873de31d18ade549c2edba64ff1c2e3" },
"render-markdown.nvim": { "branch": "main", "commit": "1faa6568eb61467d64c3d0aad8ac4c9c0e45514e" },
"rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" },
"satellite.nvim": { "branch": "main", "commit": "bce591cb5e379bd989623993c604c774633e7ed9" },
"smear-cursor.nvim": { "branch": "main", "commit": "051fe67e0081da273e07cd33ab8357d6b720f08f" },
"snacks.nvim": { "branch": "main", "commit": "d312053f78b4fb55523def179ac502438dd93193" },
"sniprun": { "branch": "master", "commit": "67ac2d84d03f3b857d59571ff5fefb6080dffa2d" },
"sonokai": { "branch": "master", "commit": "1d7ca954792dfddd9e73c53563d85adaeb8c8437" },
"sonokai": { "branch": "master", "commit": "0df1462da40e1473a61b80b7ce62497e0b59ff86" },
"stabilize.nvim": { "branch": "master", "commit": "eeb1873daffaba67246188a5668b366e45ed1de1" },
"suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" },
"surround.nvim": { "branch": "master", "commit": "36c253d6470910692491b13382f54c9bab2811e1" },
"tabout.nvim": { "branch": "master", "commit": "9a3499480a8e53dcaa665e2836f287e3b7764009" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" },
"telescope-project.nvim": { "branch": "master", "commit": "1d7920e799fc5001dffc7bd10909a86e0358eaf4" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
"timerly": { "branch": "main", "commit": "fa7c53a106b481bd58af5b766c566dc4507f1e65" },
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
"tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" },
"treesj": { "branch": "main", "commit": "94f6df623f2d15630b1b617abff39962024cb501" },
"trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" },
"urlview.nvim": { "branch": "main", "commit": "c07733179e27c225ac3c58c3951701ee10b2dbde" },
"vgit.nvim": { "branch": "main", "commit": "9afe79a3ae65594ca483c2e6161690ff9b85123b" },
"vim-fugitive": { "branch": "master", "commit": "174230d6a7f2df94705a7ffd8d5413e27ec10a80" },
"vim-grammarous": { "branch": "master", "commit": "db46357465ce587d5325e816235b5e92415f8c05" },
"vim-matchup": { "branch": "master", "commit": "aca23ce53ebfe34e02c4fe07e29e9133a2026481" },
"vim-slash": { "branch": "master", "commit": "31aee09b7ea8893a18fa34f65e63e364fc998444" },
"vimwiki": { "branch": "dev", "commit": "72792615e739d0eb54a9c8f7e0a46a6e2407c9e8" },
"volt": { "branch": "main", "commit": "b7582c8e2ab3a411a72ab058251ba22d24e70f4a" },
"vscode.nvim": { "branch": "main", "commit": "18097b7aa47538afa780c821309c8b992972d726" },
"which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" },
"windline.nvim": { "branch": "master", "commit": "bef735787bef64697036774eca6418e7a786100b" },
Expand Down
33 changes: 4 additions & 29 deletions lua/config/core/autocmd.lua
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
local Func = require("config.utils")
local M = {}

function M.autocmds()
local au_utils = vim.api.nvim_create_augroup("utils", { clear = true })
local au_ft = vim.api.nvim_create_augroup("ft", { clear = true })
local au_cmp = vim.api.nvim_create_augroup("cmp", { clear = true })

-- util
vim.api.nvim_create_autocmd("CursorHold", {
callback = function()
Func.open_diag_float()
end,
group = au_utils,
})
-- ft
vim.api.nvim_create_autocmd("FileType", {
pattern = "markdown,org,txt,tex",
Expand Down Expand Up @@ -40,7 +31,10 @@ function M.autocmds()
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client then
if client.supports_method("textDocument/documentHighlight") then
local au_lsp = vim.api.nvim_create_augroup("LSPDocumentHighlight", {})
local au_lsp = vim.api.nvim_create_augroup(
"LSPDocumentHighlight",
{ clear = true }
)

vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, {
buffer = bufnr,
Expand All @@ -56,25 +50,6 @@ function M.autocmds()
})
end
end

end,
})

vim.api.nvim_create_autocmd("LspDetach", {
group = "LSP_Highlight",
callback = function(args)
if not (args.data and args.data.client_id) then
return
end

local client = vim.lsp.get_client_by_id(args.data.client_id)
-- fixes the case where we do not create augroups when documentHighlight is not supported
-- so we check if the client supports it before deleting the augroup to align with the logic in LspAttach
if client then
if client.supports_method("textDocument/documentHighlight") then
vim.api.nvim_del_augroup_by_name("LSPDocumentHighlight")
end
end
end,
})

Expand Down
31 changes: 18 additions & 13 deletions lua/config/core/config.type.lua
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
---@meta
---@class Ui
---@field changed_themes table<ColorschemeNames, ColorScheme> a list of themes that have been changed
---@field logo string the dashboard logo (info the path your logo string will append to is the neovim config path)
---@field transparent boolean A toggle to make everything transparent
---@field colorscheme Colorscheme the colorscheme config
---@field statusline Statusline the statusline config
---@field hl_override table<string, Highlight> a table of highlights to override
---@class ConfigUi
---@field changed_themes? table<ColorschemeNames, ColorScheme> a list of themes that have been changed
---@field logo? string the dashboard logo (info the path your logo string will append to is the neovim config path)
---@field transparent? boolean A toggle to make everything transparent
---@field colorscheme? ConfigColorscheme the colorscheme config
---@field statusline? ConfigStatusline the statusline config
---@field hl_override? table<string, Highlight> a table of highlights to override

---@class Colorscheme
---@class ConfigColorscheme
---@field name ColorschemeNames the name of the colorscheme
--- the names of the colorschemes to toggle between (nice for light/dark themes)
---@field toggle ColorschemeNames[]

---@class Statusline
---@class ConfigStatusline
---@field name StatuslineThemes the name of the statusline theme
---the name of the seperator styles left and right side length = 2
---@field separator SeperatorStyle[]

---@class Plugins
---@class ConfigPlugins
---@field user table<string, LazyPluginSpec> plugins you want to add
---@field remove string[] plugins you want to remove from the default list see modules folder

---@class Config
---@field ui Ui the ui config
---@field plugins Plugins the plugin config
---@class ConfigSetup
---@field ui ConfigUi the ui config
---@field plugins ConfigPlugins the plugin config
---@field mappings MapModes the mapping config
---@field ai_options? ConfigAi the ai config

---@class ConfigAi
---@field openai_key? string
---@field copilot_key? string

---@alias StatuslineThemes
---| '"slanted_lsp"'
Expand Down
7 changes: 6 additions & 1 deletion lua/config/core/default_config.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---@module 'config.core.config.type'

---@type Config
---@class ConfigSetup
local default_config = {}

default_config.ui = {
Expand Down Expand Up @@ -49,4 +49,9 @@ default_config.plugins = {
},
}

default_config.ai_options = {
openai_key = nil,
copilot_key = nil,
}

return default_config
2 changes: 1 addition & 1 deletion lua/config/core/global.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local home = function()
return os.getenv("USERPROFILE") --[[@as string]]
end

return os.getenv("HOME") --[[@as string]]
return os.getenv("HOME") --[[@as string]]
end

---@class Global
Expand Down
Loading

0 comments on commit a099706

Please sign in to comment.