dotfiles/nix/hm-micro-editor.nix

62 lines
2.5 KiB
Nix

# Micro Editor
# I come from Sublime Text so this is pretty much me adding a bunch of shit to the micro-editor
# to make it closer to sublime
# * Left hand side file tree
# * LSP plugin
# * Command pallete w/ fuzzy find
{ config, pkgs, identity, dotfilesPath, ...}:
let
microFileManagerPlugin = pkgs.fetchFromGitHub {
# File manager for micro. https://github.com/ffs-d/filemanager-plugin
owner = "ffs-d";
repo = "filemanager-plugin";
rev = "5a98c2d9c8405b706f17232aa431f70dd5389387";
hash = "sha256-X+3P/IGtJv1yunPxMesbb9ewWQsw1PXK6672qhbktlg=";
};
microLSPPlugin = pkgs.fetchFromGitHub {
# LSP plugin for micro. https://github.com/AndCake/micro-plugin-lsp
owner = "AndCake";
repo = "micro-plugin-lsp";
rev = "a3ed3a73b2f7576b1e2dc1ac3c98dfe695e6d05d";
hash = "sha256-0an688Bc+ZtJ4JHqMfD8UAsCoKgQs6A+DRgfr1QpYG0=";
};
microPaletteroPlugin = pkgs.fetchFromGitHub {
# Command Palette for micro. https://github.com/terokarvinen/palettero
owner = "terokarvinen";
repo = "palettero";
rev = "acea69a454791ec87b349d34e20505e907b5285a";
hash = "sha256-lkXkpORT1TAXCpvaDFMB46KGx2oDblmtimUEDg4yxWc=";
};
microKDLSyntaxPlugin = pkgs.fetchFromGitHub {
owner = "kachick";
repo = "micro-kdl";
rev = "49cf49961f7526c9bda6e7dacb4ea26acc6d565f";
hash = "sha256-HbkTmt+Nl49lhoW+E+ver35aoSj0Sg2C0RUvNqNbTMY=";
};
microFZFFinderPlugin = pkgs.fetchFromGitHub {
owner = "MuratovAS";
repo = "micro-fzfinder";
rev = "c72940bdeb9f3db0f1da2193c1119aaaae4f6b42";
hash = "sha256-UmGXKY7lfcJLB+odixR+4+IfCc+E1IPfRptPshq73mA=";
};
in {
home.packages = with pkgs; [
# Built from source from github, micro-editor/micro
micro
# Required for palettero
fzf
];
programs.home-manager.enable = true;
# Micro config
home.file.".config/micro/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/micro/settings.json";
home.file.".config/micro/bindings.json".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/micro/bindings.json";
# Micro plugins
home.file.".config/micro/plug/filemanager".source = microFileManagerPlugin;
home.file.".config/micro/plug/lsp".source = microLSPPlugin;
home.file.".config/micro/plug/palettero".source = microPaletteroPlugin;
home.file.".config/micro/plug/kdl".source = microKDLSyntaxPlugin;
home.file.".config/micro/plug/fzfinder".source = microFZFFinderPlugin;
home.file.".config/micro/plug/termtitle".source = config.lib.file.mkOutOfStoreSymlink "${dotfilesPath}/.config/micro/plug/micro-termtitle";
}