feat: neovim configuration with nvf
This commit is contained in:
parent
b8cd94925e
commit
ad89d183fe
1 changed files with 240 additions and 25 deletions
|
|
@ -1,4 +1,10 @@
|
|||
{ username, pkgs, lib, ... }:
|
||||
{
|
||||
username,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
# The following line is needed if I start using hyprland Home Manager Module
|
||||
|
|
@ -10,8 +16,8 @@
|
|||
sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
};
|
||||
|
||||
homeDirectory =
|
||||
|
||||
homeDirectory =
|
||||
if pkgs.stdenv.isLinux then
|
||||
lib.mkDefault "/home/${username}"
|
||||
else if pkgs.stdenv.isDarwin then
|
||||
|
|
@ -19,24 +25,26 @@
|
|||
else
|
||||
abort "Unsupported OS";
|
||||
};
|
||||
home.packages = with pkgs; [ ]
|
||||
# linux only
|
||||
# TODO: Add a test for linux + desktop environment
|
||||
++ (lib.optionals pkgs.stdenv.isLinux [
|
||||
cfspeedtest
|
||||
helix
|
||||
nil
|
||||
])
|
||||
# linux + desktop manager
|
||||
#++ (lib.optionals (pkgs.stdenv.isLinux && osConfig.services.desktopManager.enabled != null)
|
||||
#[
|
||||
# firefox
|
||||
#])
|
||||
# darwin only
|
||||
++ (lib.optionals pkgs.stdenv.isDarwin [
|
||||
cfspeedtest
|
||||
ripgrep
|
||||
]);
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[ ]
|
||||
# linux only
|
||||
# TODO: Add a test for linux + desktop environment
|
||||
++ (lib.optionals pkgs.stdenv.isLinux [
|
||||
cfspeedtest
|
||||
helix
|
||||
nil
|
||||
])
|
||||
# linux + desktop manager
|
||||
#++ (lib.optionals (pkgs.stdenv.isLinux && osConfig.services.desktopManager.enabled != null)
|
||||
#[
|
||||
# firefox
|
||||
#])
|
||||
# darwin only
|
||||
++ (lib.optionals pkgs.stdenv.isDarwin [
|
||||
cfspeedtest
|
||||
ripgrep
|
||||
]);
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
|
|
@ -100,7 +108,7 @@
|
|||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
|
||||
|
||||
Homepage.StartPage = "previous-session";
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
|
|
@ -133,12 +141,12 @@
|
|||
id = 0;
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
settings = {
|
||||
settings = {
|
||||
"widget.disable-workspace-management" = true;
|
||||
};
|
||||
search = {
|
||||
force = true;
|
||||
default = "ddg"; # DuckDuckGo
|
||||
default = "ddg"; # DuckDuckGo
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -147,6 +155,7 @@
|
|||
# TODO: figure out how to get config.programs.<name>.enable style
|
||||
# internal references inside this file.
|
||||
# There's some quirks with how this is used in lib/default.nix
|
||||
# TODO: Use mergiraf for conflict resolution in jj too.
|
||||
programs.jujutsu = {
|
||||
enable = true;
|
||||
#enableFishIntegration = true;
|
||||
|
|
@ -158,6 +167,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
# TODO: Configure Mergiraf
|
||||
# https://mergiraf.org/introduction.html
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -191,6 +202,7 @@
|
|||
init.defaultBranch = "main";
|
||||
log.decorate = "full";
|
||||
log.date = "iso";
|
||||
# NOTE: Initially diff3 was for me, now it's for me and mergiraf automation.
|
||||
merge.conflictStyle = "diff3";
|
||||
};
|
||||
# Cribbed from: https://github.com/gitattributes/gitattributes
|
||||
|
|
@ -304,9 +316,212 @@
|
|||
'';
|
||||
};
|
||||
|
||||
# TODO: Implement support for at least
|
||||
# Nix, Python, Rust, Golang
|
||||
# TODO: Sort out why TF, `.nix` files tabs are cooked in neovim rn.
|
||||
# It corrects things on document save, but this line for example started with an 8-long tabstop
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
# When using the Home-Manager Module for nvf, the settings go into the following attribute set.
|
||||
# https://notashelf.github.io/nvf/index.xhtml#sec-hm-flakes
|
||||
settings.vim = {
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
# TODO: For some reason spellcheck is having a very difficult time getting
|
||||
# a wordlist.
|
||||
#spellcheck = {
|
||||
# enable = true;
|
||||
# programmingWordlist.enable = true;
|
||||
#};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
formatOnSave = true;
|
||||
lspkind.enable = false;
|
||||
lightbulb.enable = true;
|
||||
lspsaga.enable = false;
|
||||
trouble.enable = true;
|
||||
lspSignature.enable = false;
|
||||
otter-nvim.enable = true;
|
||||
nvim-docs-view.enable = true;
|
||||
};
|
||||
|
||||
languages = {
|
||||
enableDAP = true;
|
||||
enableExtraDiagnostics = true;
|
||||
enableFormat = true;
|
||||
enableTreesitter = true;
|
||||
|
||||
nix = {
|
||||
enable = true;
|
||||
lsp.enable = true;
|
||||
lsp.server = "nixd";
|
||||
extraDiagnostics.enable = true;
|
||||
format.enable = true;
|
||||
format.type = "nixfmt";
|
||||
treesitter.enable = true;
|
||||
};
|
||||
markdown.enable = true;
|
||||
typst.enable = true;
|
||||
|
||||
assembly.enable = true;
|
||||
bash.enable = true;
|
||||
clang.enable = true;
|
||||
|
||||
python.enable = true;
|
||||
rust = {
|
||||
enable = true;
|
||||
# TODO: null_ls is now deprecated.
|
||||
# https://github.com/NotAShelf/nvf/issues/1175
|
||||
# https://github.com/NotAShelf/nvf/blob/main/.github/CONTRIBUTING.md
|
||||
crates.enable = true;
|
||||
};
|
||||
go.enable = true;
|
||||
zig.enable = true;
|
||||
|
||||
ts.enable = true;
|
||||
html.enable = true;
|
||||
css.enable = true;
|
||||
sql.enable = true;
|
||||
};
|
||||
|
||||
visuals = {
|
||||
nvim-scrollbar.enable = true; # Configurable Visual Scrollbar (Can pair with Cursor, ALE, Diagnostics, Gitsigns, and hlslens)
|
||||
nvim-web-devicons.enable = true; # Nerdfont Icons for use by other plugins
|
||||
nvim-cursorline.enable = true; # Highlight Words & Lines on the cursor
|
||||
cinnamon-nvim.enable = true; # Smooth Scrolling for any movement command.
|
||||
fidget-nvim.enable = true; # UI for Notifications & LSP Progress Messages
|
||||
|
||||
highlight-undo.enable = true; # Highlight changed text after any non-insert actions
|
||||
indent-blankline.enable = true; # Indentation Guides
|
||||
};
|
||||
|
||||
statusline = {
|
||||
lualine = {
|
||||
# Fancy Status Line
|
||||
enable = true;
|
||||
theme = "catppuccin";
|
||||
};
|
||||
};
|
||||
|
||||
theme = {
|
||||
enable = true;
|
||||
name = "catppuccin";
|
||||
style = "mocha";
|
||||
transparent = false;
|
||||
};
|
||||
|
||||
autopairs.nvim-autopairs.enable = true; # Pair up ", {, (, etc.
|
||||
# blink-cmp is a compiled rust binary while nvim-cmp is a pure lua plugin...
|
||||
autocomplete.blink-cmp.enable = true;
|
||||
# Code Snippets Engine /w support for Lua, VSCode, and SnipMate snippets.
|
||||
snippets.luasnip.enable = true;
|
||||
|
||||
filetree.neo-tree.enable = true; # Filesystem tree sidebar...
|
||||
tabline.nvimBufferline.enable = true; # Shows buffers as tabs at the top.
|
||||
treesitter.context.enable = true;
|
||||
binds = {
|
||||
whichKey.enable = true; # Shows your available keybindings in a popup
|
||||
cheatsheet.enable = true; # Searchable in-editor cheatsheet that uses Telescope
|
||||
};
|
||||
telescope.enable = true; # Fuzzy Finder, central to many other plugins.
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
gitsigns.enable = true; # Git Info in Buffers + Gutters
|
||||
gitsigns.codeActions.enable = false;
|
||||
neogit.enable = true; # Interactive Git
|
||||
};
|
||||
|
||||
# TODO: Consider switching to `minimap-nvim` for rust-based minimap.
|
||||
# codewindow may be tightly integrated with treesitter though...
|
||||
minimap.codewindow.enable = true;
|
||||
dashboard.alpha.enable = true; # Greeter
|
||||
notify.nvim-notify.enable = true; # Fancy Configurable Notification Manager
|
||||
projects.project-nvim.enable = true;
|
||||
|
||||
utility = {
|
||||
ccc.enable = true; # Color Picker
|
||||
diffview-nvim.enable = true;
|
||||
icon-picker.enable = true;
|
||||
surround.enable = true; # Change Surrounding Delimiter pairs `ysiw)`
|
||||
leetcode-nvim.enable = true; # Allow solving LeetCode problems directly inside neovim
|
||||
multicursors.enable = true; # Edit with multiple cursors simultaneously
|
||||
smart-splits.enable = true; # Split-Pane Management
|
||||
undotree.enable = true; # Undo history visualizer
|
||||
nvim-biscuits.enable = true; # Shows the start of a code block from the bottom
|
||||
|
||||
motion = {
|
||||
# NOTE: https://github.com/smoka7/hop.nvim
|
||||
hop.enable = true; # EasyMotion like, allowing you to jump anywhere in the document with as few keystrokes as possible
|
||||
leap.enable = true; # Jump to anywhere visible
|
||||
# TODO: I sort of hate how precognition injects itself in virtual
|
||||
# lines, but I do like that it can be used to give a reminder.
|
||||
precognition.enable = false; # Helps with discovering motions to navigate your current buffer
|
||||
};
|
||||
images.img-clip.enable = true;
|
||||
};
|
||||
|
||||
# TODO: Get Obsidian Working.
|
||||
notes = {
|
||||
# obsidian.enable = true; # neovim fails to build with this enabled.
|
||||
mind-nvim.enable = true;
|
||||
todo-comments.enable = true;
|
||||
};
|
||||
|
||||
terminal = {
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
lazygit.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
ui = {
|
||||
borders.enable = true;
|
||||
noice.enable = true;
|
||||
colorizer.enable = true;
|
||||
modes-nvim.enable = false; # this looks terrible with catppuccin
|
||||
illuminate.enable = true;
|
||||
breadcrumbs = {
|
||||
enable = true;
|
||||
navbuddy.enable = true;
|
||||
};
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
setupOpts.custom_colorcolumn = {
|
||||
nix = "110";
|
||||
ruby = "120";
|
||||
java = "130";
|
||||
go = [
|
||||
"90"
|
||||
"130"
|
||||
];
|
||||
};
|
||||
};
|
||||
fastaction.enable = true;
|
||||
};
|
||||
|
||||
assistant = {
|
||||
chatgpt.enable = false;
|
||||
copilot = {
|
||||
enable = false;
|
||||
cmp.enable = true;
|
||||
};
|
||||
codecompanion-nvim.enable = false;
|
||||
# avante-nvim.enable = true;
|
||||
};
|
||||
|
||||
session.nvim-session-manager.enable = true; # Save sessions to reopen later
|
||||
gestures.gesture-nvim.enable = false; # mouse gesture support?
|
||||
comments.comment-nvim.enable = true; # Fancy commenting
|
||||
presence.neocord.enable = true; # Discord Rich Presence
|
||||
};
|
||||
};
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
mutableExtensionsDir = true; # mutually exclusive to programs.vscode.profiles
|
||||
mutableExtensionsDir = true; # mutually exclusive to programs.vscode.profiles
|
||||
profiles.default.userSettings = {
|
||||
"[nix]"."editor.tabSize" = 2;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue