Compare commits

...

8 Commits

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

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

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

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

@ -0,0 +1,47 @@
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",
},
},
},
}

@ -0,0 +1,22 @@
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,18 +0,0 @@
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}
--

@ -1,66 +0,0 @@
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

@ -1,12 +0,0 @@
-- 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'
}
})

@ -1,38 +0,0 @@
---@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

@ -0,0 +1,25 @@
---@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 })

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

@ -1,5 +1,3 @@
local overrides = require("custom.configs.overrides")
---@type NvPluginSpec[]
local plugins = {
@ -8,15 +6,35 @@ local plugins = {
{
"neovim/nvim-lspconfig",
config = function()
require("plugins.configs.lspconfig")
require("custom.configs.lspconfig")
-- require "plugins.configs.lspconfig"
require "configs.lspconfig"
end, -- Override to setup mason-lspconfig
},
-- override plugin configs
{
"williamboman/mason.nvim",
opts = overrides.mason,
opts = {
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",
},
},
},
-- {
@ -24,7 +42,20 @@ local plugins = {
-- opts = overrides.treesitter, },
{
"nvim-tree/nvim-tree.lua",
opts = overrides.nvimtree,
opts = {
git = {
enable = true,
},
renderer = {
highlight_git = true,
icons = {
show = {
git = true,
},
},
},
},
},
-- Install a plugin
@ -41,7 +72,32 @@ local plugins = {
-- for users those who want auto-save conform + lazyloading!
-- event = "BufWritePre"
config = function()
require("custom.configs.conform")
local options = {
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,
},
@ -63,7 +119,30 @@ local plugins = {
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
},
opts = overrides.treesitter,
opts = {
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)
-- dofile(vim.g.base46_cache .. "syntax")
-- require("nvim-treesitter.configs").setup(opts)
Loading…
Cancel
Save