3 Commits

Author SHA1 Message Date
f85a008741 set checks on individual languages 2024-02-07 23:04:08 -05:00
6c2fc0289b drop apache-directory-studio in favor of ldapsearch
apache directory studio can't figure out how to make it work on m3
2024-02-07 22:08:22 -05:00
5034ada458 add time format to meetingbar and remove scroll zoom
scroll wheel zoom updates don't work for whatever reason
2024-02-07 21:23:01 -05:00
6 changed files with 29 additions and 22 deletions

View File

@ -1,10 +1,11 @@
{ pkgs, lib, config, dsl, ... }: {
# Terraform optional because non-free
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
options.github = lib.mkEnableOption "Whether to enable GitHub features";
options.kubernetes =
lib.mkEnableOption "Whether to enable Kubernetes features";
options.python = lib.mkEnableOption "Whether to enable Python LSP";
options.terraform = lib.mkEnableOption "Whether to enable Terraform LSP";
config =
@ -18,6 +19,12 @@
'' else
"";
pythonFormat = if config.python then ''
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
require("null-ls").builtins.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
'' else
"";
in {
plugins = [
pkgs.vimPlugins.nvim-lspconfig
@ -41,7 +48,11 @@
};
use.lspconfig.pyright.setup = dsl.callWith {
cmd = [ "${pkgs.pyright}/bin/pyright-langserver" "--stdio" ];
cmd = if config.python then [
"${pkgs.pyright}/bin/pyright-langserver"
"--stdio"
] else
[ "echo" ];
};
use.lspconfig.terraformls.setup = dsl.callWith {
@ -70,8 +81,6 @@
require("null-ls").setup({
sources = {
require("null-ls").builtins.formatting.stylua.with({ command = "${pkgs.stylua}/bin/stylua" }),
require("null-ls").builtins.formatting.black.with({ command = "${pkgs.black}/bin/black" }),
require("null-ls").builtins.diagnostics.ruff.with({ command = "${pkgs.ruff}/bin/ruff" }),
require("null-ls").builtins.formatting.fish_indent.with({ command = "${pkgs.fish}/bin/fish_indent" }),
require("null-ls").builtins.formatting.nixfmt.with({ command = "${pkgs.nixfmt}/bin/nixfmt" }),
require("null-ls").builtins.formatting.rustfmt.with({ command = "${pkgs.rustfmt}/bin/rustfmt" }),
@ -80,6 +89,7 @@
command = "${pkgs.shfmt}/bin/shfmt",
extra_args = { "-i", "4", "-ci" },
}),
${pythonFormat}
${terraformFormat}
},

View File

@ -1,12 +1,12 @@
{ pkgs, lib, ... }: {
{ pkgs, lib, config, ... }: {
plugins = [
(pkgs.vimPlugins.nvim-treesitter.withPlugins (_plugins:
with pkgs.tree-sitter-grammars; [
with pkgs.tree-sitter-grammars;
[
tree-sitter-bash
tree-sitter-c
tree-sitter-fish
tree-sitter-hcl
tree-sitter-ini
tree-sitter-json
tree-sitter-lua
@ -14,16 +14,15 @@
tree-sitter-markdown-inline
tree-sitter-nix
tree-sitter-puppet
tree-sitter-python
tree-sitter-rasi
tree-sitter-toml
tree-sitter-vimdoc
tree-sitter-yaml
]))
] ++ (if config.python.enable then [ tree-sitter-python ] else [ ])
++ (if config.terraform.enable then [ tree-sitter-hcl ] else [ ])))
pkgs.vimPlugins.vim-matchup # Better % jumping in languages
pkgs.vimPlugins.playground # Tree-sitter experimenting
pkgs.vimPlugins.nginx-vim
pkgs.vimPlugins.vim-helm
pkgs.baleia-nvim # Clean ANSI from kitty scrollback
# pkgs.hmts-nvim # Tree-sitter injections for home-manager
(pkgs.vimUtils.buildVimPlugin {
@ -31,7 +30,7 @@
version = "0.1";
src = ../plugin;
})
];
] ++ (if config.kubernetes.enable then [ pkgs.vimPlugins.vim-helm ] else [ ]);
setup."nvim-treesitter.configs" = {
highlight = { enable = true; };

View File

@ -5,9 +5,11 @@ let
neovim = import ./package {
inherit pkgs;
colors = config.theme.colors;
terraform = config.terraform.enable;
c = config.c.enable;
github = true;
kubernetes = config.kubernetes.enable;
python = config.python.enable;
terraform = config.terraform.enable;
};
in {

View File

@ -0,0 +1 @@
{ lib, ... }: { options.c.enable = lib.mkEnableOption "C language tools."; }

View File

@ -30,17 +30,14 @@
};
brews = [
"trash" # Delete files and folders to trash instead of rm
"openjdk" # Required by Apache Directory Studio
];
casks = [
"1password" # 1Password will not launch from Nix on macOS
"apache-directory-studio" # Packaging on Nix is not available for macOS
# "gitify" # Git notifications in menu bar (downgrade manually from 4.6.1)
"keybase" # GUI on Nix not available for macOS
# "logitech-g-hub" # Mouse and keyboard management
"logitune" # Logitech webcam firmware
"meetingbar" # Show meetings in menu bar
# "obsidian" # Obsidian packaging on Nix is not available for macOS
"scroll-reverser" # Different scroll style for mouse vs. trackpad
# "steam" # Not packaged for Nix
# "epic-games" # Not packaged for Nix

View File

@ -112,13 +112,6 @@
# Disable trackpad tap to click
trackpad.Clicking = false;
# universalaccess = {
# # Zoom in with Control + Scroll Wheel
# closeViewScrollWheelToggle = true;
# closeViewZoomFollowsFocus = true;
# };
# Where to save screenshots
screencapture.location = "~/Downloads";
@ -179,9 +172,14 @@
''{"deletable":true,"arguments":"","name":"Zoom","path":""}'';
KeyboardShortcuts_joinEventShortcut =
''{"carbonModifiers":6400,"carbonKeyCode":38}'';
timeFormat = ''"12-hour"'';
};
};
CustomSystemPreferences = {
};
};
# Settings that don't have an option in nix-darwin