-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
464 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"lspconfig": { | ||
"nixd": { | ||
"nixd": { | ||
"options": { | ||
"nixos": { | ||
"expr": "(builtins.getFlake (builtins.toString ./.)).nixosConfigurations.${builtins.replaceStrings [\"\n\"] [\"\"] (builtins.readFile \"/etc/hostname\")}.options" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
local lazy_path = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | ||
|
||
if not (vim.uv or vim.loop).fs_stat(lazy_path) then | ||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", | ||
lazy_path }) | ||
end | ||
|
||
vim.opt.rtp:prepend(lazy_path) | ||
|
||
if not pcall(require, "lazy") then | ||
vim.api.nvim_echo( | ||
{ { ("Unable to load lazy from: %s\n"):format(lazy_path), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, | ||
true, {}) | ||
vim.fn.getchar() | ||
vim.cmd.quit() | ||
end | ||
|
||
require("lazy").setup({ | ||
{ | ||
"AstroNvim/AstroNvim", | ||
version = "^4", | ||
import = "astronvim.plugins", | ||
opts = { | ||
icons_enabled = true, | ||
}, | ||
}, | ||
{ | ||
"nvim-treesitter/nvim-treesitter", | ||
commit = vim.fn.readfile(vim.fn.stdpath("config") .. "/treesitter-rev", "", 1)[1], | ||
}, | ||
{ import = "community" }, | ||
{ import = "plugins" }, | ||
{ import = "lsp" }, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
---@type LazySpec | ||
return { | ||
{ | ||
"AstroNvim/astrocommunity", | ||
branch = "main" | ||
}, | ||
{ import = "astrocommunity.colorscheme.catppuccin" }, | ||
{ import = "astrocommunity.pack.lua" }, | ||
{ import = "astrocommunity.diagnostics.trouble-nvim" }, | ||
{ import = "astrocommunity.utility.hover-nvim" }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
---@type LazySpec | ||
return { | ||
{ | ||
"nvim-treesitter/nvim-treesitter", | ||
opts = { | ||
ensure_installed = { "nix" }, | ||
}, | ||
}, | ||
{ | ||
"nvimtools/none-ls.nvim", | ||
opts = function(_, opts) | ||
local builtins = require("null-ls").builtins | ||
|
||
opts.sources = require("astrocore").list_insert_unique(opts.sources, { | ||
builtins.code_actions.statix, | ||
builtins.diagnostics.deadnix, | ||
builtins.formatting.nixfmt, | ||
}) | ||
end, | ||
}, | ||
{ | ||
"AstroNvim/astrolsp", | ||
---@type AstroLSPOpts | ||
opts = { | ||
servers = { "nixd" }, | ||
config = { | ||
nixd = { | ||
nixpkgs = { | ||
expr = "import (builtins.getFlake (builtins.toString ./.)).inputs.nixpkgs { }" | ||
}, | ||
formatting = { | ||
command = { "nixfmt" }, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
---@type LazySpec | ||
return { | ||
"AstroNvim/astrolsp", | ||
---@type AstroLSPOpts | ||
opts = { | ||
features = { | ||
inlay_hints = true, | ||
signature_help = true, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
---@type LazySpec | ||
return { | ||
"IogaMaster/neocord", | ||
event = "VeryLazy", | ||
opts = { | ||
log_level = nil, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
---@type LazySpec | ||
return { | ||
"AstroNvim/astrocore", | ||
---@type AstroCoreOpts | ||
opts = { | ||
mappings = { | ||
n = { | ||
-- Neotree: remember last source and make git the default | ||
["<Leader>e"] = { "<Cmd>Neotree toggle source=git_status<CR>", desc = "Toggle Explorer" }, | ||
["<Leader>o"] = { | ||
function() | ||
if vim.bo.filetype == "neo-tree" then | ||
vim.cmd.wincmd("p") | ||
else | ||
vim.cmd.Neotree({ "focus", "source=last" }) | ||
end | ||
end, | ||
desc = "Toggle Explorer Focus", | ||
}, | ||
-- Switch between tabs | ||
["<S-Tab>"] = { ":bprev<CR>" }, | ||
["<Tab>"] = { ":bnext<CR>" }, | ||
|
||
-- Disable hover.nvim when moving mouse | ||
["<MouseMove>"] = false, | ||
}, | ||
t = { | ||
-- Easier escape from the toggleterm.nvim plugin | ||
["<ESC><ESC>"] = { "<C-\\><C-n>" }, | ||
["<S-ESC>"] = { "<C-\\><C-n>" }, | ||
}, | ||
c = { | ||
-- Write file as sudo | ||
["w!!"] = { "w !sudo tee > /dev/null %", desc = "Write as sudo" }, | ||
}, | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
-- customize mason plugins | ||
local suggested_packages = {} | ||
|
||
--- Clear "ensure_installed" option but add pkgs to a "suggested-pkgs.json" file | ||
--- so that missing pkgs can be installed via Nix dotfiles | ||
local disable_auto_install = function(_, opts) | ||
require("astrocore").list_insert_unique(suggested_packages, opts.ensure_installed or {}) | ||
|
||
local file = io.open(vim.fn.stdpath("data") .. "/suggested-pkgs.json", "w") | ||
file:write(vim.fn.json_encode(suggested_packages)) | ||
file:close() | ||
|
||
opts.ensure_installed = {} | ||
end | ||
|
||
return { | ||
{ | ||
"williamboman/mason-lspconfig.nvim", | ||
opts = disable_auto_install, | ||
}, | ||
{ | ||
"jay-babu/mason-null-ls.nvim", | ||
opts = disable_auto_install, | ||
}, | ||
{ | ||
"jay-babu/mason-nvim-dap.nvim", | ||
opts = disable_auto_install, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
---@type LazySpec | ||
return { | ||
"nvim-neo-tree/neo-tree.nvim", | ||
opts = { | ||
follow_current_file = true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
---@types LazySpec | ||
return { | ||
"folke/neoconf.nvim", | ||
opts = { | ||
import = { | ||
vscode = false, | ||
coc = false, | ||
nlsp = false, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
---@type LazySpec | ||
return { | ||
{ | ||
"lewis6991/spaceless.nvim", | ||
init = function() | ||
require("spaceless").setup() | ||
end, | ||
}, | ||
} |
Oops, something went wrong.