chore: switch to nixfmt-rfc-style

This commit is contained in:
Youwen Wu 2024-09-02 18:28:53 -07:00
parent 93a8dac2f2
commit 59189d88db
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
9 changed files with 113 additions and 65 deletions

View file

@ -1,5 +1,10 @@
{pkgs, ...}: {
imports = [./plugins ./keymaps.nix ./init.nix];
{ pkgs, ... }:
{
imports = [
./plugins
./keymaps.nix
./init.nix
];
viAlias = true;
vimAlias = true;
withNodeJs = true;

View file

@ -278,22 +278,34 @@
{
action = "<Plug>(YankyPutAfter)";
key = "p";
mode = ["n" "x"];
mode = [
"n"
"x"
];
}
{
action = "<Plug>(YankyPutBefore)";
key = "P";
mode = ["n" "x"];
mode = [
"n"
"x"
];
}
{
action = "<Plug>(YankyGPutAfter)";
key = "gp";
mode = ["n" "x"];
mode = [
"n"
"x"
];
}
{
action = "<Plug>(YankyGPutBefore)";
key = "gP";
mode = ["n" "x"];
mode = [
"n"
"x"
];
}
{
action = ":Telescope yank_history<CR>";

View file

@ -5,14 +5,24 @@
enable = true;
settings = {
autoEnableSources = true;
experimental = {ghost_text = true;};
experimental = {
ghost_text = true;
};
performance = {
debounce = 60;
fetchingTimeout = 200;
maxViewEntries = 30;
};
snippet = {expand = "luasnip";};
formatting = {fields = ["kind" "abbr" "menu"];};
snippet = {
expand = "luasnip";
};
formatting = {
fields = [
"kind"
"abbr"
"menu"
];
};
sources = [
{ name = "nvim_lsp"; }
{ name = "emoji"; }
@ -33,8 +43,12 @@
];
window = {
completion = {border = "solid";};
documentation = {border = "solid";};
completion = {
border = "solid";
};
documentation = {
border = "solid";
};
};
mapping = {

View file

@ -1,3 +1,13 @@
{
imports = [./lsps.nix ./setup.nix ./formatters.nix ./cmp.nix ./qol.nix ./mini.nix ./misc.nix ./navigation.nix ./treesitter.nix];
imports = [
./lsps.nix
./setup.nix
./formatters.nix
./cmp.nix
./qol.nix
./mini.nix
./misc.nix
./navigation.nix
./treesitter.nix
];
}

View file

@ -1,5 +1,6 @@
# Code formatters
{pkgs, ...}: {
{ pkgs, ... }:
{
extraPackages = with pkgs; [
# TS/JS, Markdown, TOML, JSON, etc
nodePackages.prettier

View file

@ -1,5 +1,6 @@
# LSP setup
{pkgs, ...}: {
{ pkgs, ... }:
{
extraPackages = with pkgs; [
rust-analyzer
lua-language-server

View file

@ -1,5 +1,6 @@
# Quality of life plugins
{pkgs, ...}: {
{ pkgs, ... }:
{
extraPackages = with pkgs; [
ripgrep
yazi

View file

@ -8,7 +8,8 @@
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = {
outputs =
{
nixvim,
flake-parts,
...
@ -21,11 +22,13 @@
"aarch64-darwin"
];
perSystem = {
perSystem =
{
pkgs,
system,
...
}: let
}:
let
nixvimLib = nixvim.lib.${system};
nixvim' = nixvim.legacyPackages.${system};
nixvimModule = {
@ -33,8 +36,9 @@
module = import ./config;
};
nvim = nixvim'.makeNixvimWithModule nixvimModule;
in {
formatter = pkgs.alejandra;
in
{
formatter = pkgs.nixfmt-rfc-style;
checks = {
default = nixvimLib.check.mkTestDerivationFromNixvimModule nixvimModule;
};