Compare commits

..

No commits in common. 'f7f53d03d2ef47187a1c39c0f360781ea17e6558' and '7219f02482d1ba4ba252927c59acaf5dfa9916a1' have entirely different histories.

  1. 13
      nix-darwin/home.nix
  2. 3
      nix-darwin/modules/skhd.nix
  3. 47
      nvchad/.config/nvim/lua/configs/lazy.lua
  4. 22
      nvchad/.config/nvim/lua/configs/lspconfig.lua
  5. 12
      nvchad/.config/nvim/lua/custom/chadrc.lua
  6. 0
      nvchad/.config/nvim/lua/custom/configs/conform.lua
  7. 18
      nvchad/.config/nvim/lua/custom/configs/lspconfig.lua
  8. 66
      nvchad/.config/nvim/lua/custom/configs/overrides.lua
  9. 0
      nvchad/.config/nvim/lua/custom/highlights.lua
  10. 12
      nvchad/.config/nvim/lua/custom/init.lua
  11. 38
      nvchad/.config/nvim/lua/custom/mappings.lua
  12. 95
      nvchad/.config/nvim/lua/custom/plugins.lua
  13. 25
      nvchad/.config/nvim/lua/mappings.lua
  14. 6
      nvchad/.config/nvim/lua/options.lua

@ -79,7 +79,6 @@
jq jq
tmux tmux
htop htop
ripgrep
sshfs sshfs
# Cringe # Cringe
@ -98,8 +97,6 @@
# haskell # haskell
ghc ghc
haskell-language-server
haskellPackages.cabal-install
# rust # rust
rustc rustc
@ -112,7 +109,7 @@
# golang # golang
go go
# lua <3 (divine intellect) # lua <3
lua lua
# ruby # ruby
@ -125,14 +122,6 @@
python3 python3
python312Packages.pip python312Packages.pip
# formatters
shfmt
nodePackages.prettier
black
clang-tools # clang-format
nixpkgs-fmt
stylish-haskell
# DE/WM/Ricing # DE/WM/Ricing
yabai # wm yabai # wm
skhd # key mngr skhd # key mngr

@ -73,9 +73,6 @@ in
# Start browser # Start browser
cmd - b : open -n ${browserPath} cmd - b : open -n ${browserPath}
# Screenshot selection
cmd - f3 : screencapture -i -c
''; '';
}; };
} }

@ -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",
},
},
},
}

@ -1,22 +0,0 @@
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 = { "html", "cssls", "tsserver", "clangd", "ghdl_ls", "hls", "tailwindcss", "pyright", "julials" }
-- lsps with default config
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
}
end
-- typescript
lspconfig.tsserver.setup {
on_attach = on_attach,
on_init = on_init,
capabilities = capabilities,
}

@ -1,11 +1,8 @@
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua
---@type ChadrcConfig ---@type ChadrcConfig
local M = {} local M = {}
-- Path to overriding theme and highlights files -- Path to overriding theme and highlights files
local highlights = require "highlights" local highlights = require "custom.highlights"
M.ui = { M.ui = {
theme = "gruvchad", theme = "gruvchad",
@ -15,4 +12,11 @@ M.ui = {
hl_add = highlights.add, hl_add = highlights.add,
} }
M.plugins = "custom.plugins"
-- check core.mappings for table structure
M.mappings = require "custom.mappings"
return M return M

@ -0,0 +1,18 @@
local on_attach = require("plugins.configs.lspconfig").on_attach
local capabilities = require("plugins.configs.lspconfig").capabilities
local lspconfig = require("lspconfig")
-- if you just want default config for the servers then put them in a table
local servers = { "html", "cssls", "tsserver", "clangd", "ghdl_ls", "hls", "tailwindcss", "pyright", "julials" }
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup({
on_attach = on_attach,
capabilities = capabilities,
})
end
--
-- lspconfig.pyright.setup { blabla}
--

@ -0,0 +1,66 @@
local M = {}
M.treesitter = {
ensure_installed = {
"vim",
"lua",
"html",
"css",
"javascript",
"typescript",
"tsx",
"c",
"markdown",
"markdown_inline",
"prisma",
"haskell",
"python",
"zig",
},
indent = {
enable = true,
-- disable = {
-- "python"
-- },
},
}
M.mason = {
ensure_installed = {
-- lua stuff
"lua-language-server",
"stylua",
-- web dev stuff
"css-lsp",
"html-lsp",
"typescript-language-server",
"deno",
"prettier",
-- c/cpp stuff
"clangd",
"clang-format",
-- Fun/joke langs
"hls",
},
}
-- git support in nvimtree
M.nvimtree = {
git = {
enable = true,
},
renderer = {
highlight_git = true,
icons = {
show = {
git = true,
},
},
},
}
return M

@ -0,0 +1,12 @@
-- local autocmd = vim.api.nvim_create_autocmd
-- Auto resize panes when resizing nvim window
-- autocmd("VimResized", {
-- pattern = "*",
-- command = "tabdo wincmd =",
-- })
vim.filetype.add({
extension = {
mdx = 'mdx'
}
})

@ -0,0 +1,38 @@
---@type MappingsTable
local M = {}
M.general = {
n = {
[";"] = { ":", "enter command mode", opts = { nowait = true } },
-- format with conform
["<leader>fm"] = {
function()
require("conform").format()
end,
"formatting",
},
},
v = {
-- Indentation
[">"] = { ">gv", "indent" },
-- Move selection up/down with K/J
["J"] = { ":m '>+1<CR>gv=gv", "move selection down" },
["K"] = { ":m '<-2<CR>gv=gv", "move selection up" },
},
i = {
["<C-l>"] = {
function()
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "")
end,
"Copilot Accept",
{ replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true },
},
},
}
-- more keybinds!
return M

@ -1,3 +1,5 @@
local overrides = require("custom.configs.overrides")
---@type NvPluginSpec[] ---@type NvPluginSpec[]
local plugins = { local plugins = {
@ -6,35 +8,15 @@ local plugins = {
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
config = function() config = function()
-- require "plugins.configs.lspconfig" require("plugins.configs.lspconfig")
require "configs.lspconfig" require("custom.configs.lspconfig")
end, -- Override to setup mason-lspconfig end, -- Override to setup mason-lspconfig
}, },
-- override plugin configs -- override plugin configs
{ {
"williamboman/mason.nvim", "williamboman/mason.nvim",
opts = { opts = overrides.mason,
ensure_installed = {
-- lua stuff
"lua-language-server",
"stylua",
-- web dev stuff
"css-lsp",
"html-lsp",
"typescript-language-server",
"deno",
"prettier",
-- c/cpp stuff
"clangd",
"clang-format",
-- Fun/joke langs
"hls",
},
},
}, },
-- { -- {
@ -42,20 +24,7 @@ local plugins = {
-- opts = overrides.treesitter, }, -- opts = overrides.treesitter, },
{ {
"nvim-tree/nvim-tree.lua", "nvim-tree/nvim-tree.lua",
opts = { opts = overrides.nvimtree,
git = {
enable = true,
},
renderer = {
highlight_git = true,
icons = {
show = {
git = true,
},
},
},
},
}, },
-- Install a plugin -- Install a plugin
@ -72,32 +41,7 @@ local plugins = {
-- for users those who want auto-save conform + lazyloading! -- for users those who want auto-save conform + lazyloading!
-- event = "BufWritePre" -- event = "BufWritePre"
config = function() config = function()
local options = { require("custom.configs.conform")
lsp_fallback = true,
formatters_by_ft = {
-- Divine Intellect Languages
lua = { "stylua" },
-- Web Dev shit
javascript = { "prettier" },
typescript = { "prettier" },
javascriptreact = { "prettier" },
typescriptreact = { "prettier" },
css = { "prettier" },
scss = { "prettier" },
html = { "prettier" },
-- Data Science & AI stuff
python = { "black" },
sh = { "shfmt" },
-- Joke langs
haskell = { "stylish-haskell" }
},
}
require("conform").setup(options)
end, end,
}, },
@ -119,30 +63,7 @@ local plugins = {
dependencies = { dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring", "JoosepAlviste/nvim-ts-context-commentstring",
}, },
opts = { opts = overrides.treesitter,
ensure_installed = {
"vim",
"lua",
"html",
"css",
"javascript",
"typescript",
"tsx",
"c",
"markdown",
"markdown_inline",
"prisma",
"haskell",
"python",
"zig",
},
indent = {
enable = true,
-- disable = {
-- "python"
-- },
},
},
-- config = function(_, opts) -- config = function(_, opts)
-- dofile(vim.g.base46_cache .. "syntax") -- dofile(vim.g.base46_cache .. "syntax")
-- require("nvim-treesitter.configs").setup(opts) -- require("nvim-treesitter.configs").setup(opts)

@ -1,25 +0,0 @@
---@type MappingsTable
require "nvchad.mappings"
local map = vim.keymap.set
-- General
map("n", ";", ":", { desc = "enter command mode", nowait = true })
-- Format with conform
map("n", "<leader>fm", function()
require("conform").format()
end, { desc = "formatting" })
-- Indentation in visual mode
map("v", ">", ">gv", { desc = "indent" })
-- Move selection up/down with K/J in visual mode
map("v", "J", ":m '>+1<CR>gv=gv", { desc = "move selection down" })
map("v", "K", ":m '<-2<CR>gv=gv", { desc = "move selection up" })
-- Copilot accept in insert mode
map("i", "<C-l>", function()
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "")
end, { desc = "Copilot Accept", replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true })

@ -1,6 +0,0 @@
require "nvchad.options"
-- add yours here!
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
Loading…
Cancel
Save