fix neovide by installing w/ nix
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
|
||||
# base system package install list
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovide
|
||||
];
|
||||
|
||||
nix-homebrew = {
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
program = "nvf";
|
||||
cfg = config.dots.${program};
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
isDarwin = pkgs.stdenv.isDarwin;
|
||||
#sec = sops.secrets;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options.dots.${program} = {
|
||||
enable = lib.mkEnableOption "enables ${program}";
|
||||
};
|
||||
@@ -26,12 +28,14 @@ in {
|
||||
vim = {
|
||||
clipboard =
|
||||
# On Linux, use wl-copy as you do now
|
||||
if isLinux then {
|
||||
if isLinux then
|
||||
{
|
||||
enable = true;
|
||||
providers.wl-copy.enable = true;
|
||||
registers = "unnamed,unnamedplus";
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
enable = true;
|
||||
registers = "unnamed,unnamedplus";
|
||||
};
|
||||
@@ -53,13 +57,13 @@ in {
|
||||
# visual line movement (insert mode)
|
||||
{
|
||||
key = "<Up>";
|
||||
mode = ["i"];
|
||||
mode = [ "i" ];
|
||||
action = "<C-o>gk";
|
||||
desc = "Visual Line Up (Insert)";
|
||||
}
|
||||
{
|
||||
key = "<Down>";
|
||||
mode = ["i"];
|
||||
mode = [ "i" ];
|
||||
action = "<C-o>gj";
|
||||
desc = "Visual Line Down (Insert)";
|
||||
}
|
||||
@@ -91,7 +95,7 @@ in {
|
||||
|
||||
{
|
||||
key = "gd";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.definition()<CR>";
|
||||
desc = "Go to definition";
|
||||
@@ -99,7 +103,7 @@ in {
|
||||
# Hover info
|
||||
{
|
||||
key = "K";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.hover()<CR>";
|
||||
desc = "Hover info";
|
||||
@@ -107,7 +111,7 @@ in {
|
||||
# Format buffer (Alejandra for Nix)
|
||||
{
|
||||
key = "<leader>F";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.format({ async = true })<CR>";
|
||||
desc = "Format buffer";
|
||||
@@ -115,7 +119,7 @@ in {
|
||||
# Code actions / quickfix
|
||||
{
|
||||
key = "<leader>a";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.code_action()<CR>";
|
||||
desc = "Code action";
|
||||
@@ -123,7 +127,7 @@ in {
|
||||
# Rename symbol
|
||||
{
|
||||
key = "<leader>r";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.lsp.buf.rename()<CR>";
|
||||
desc = "Rename symbol";
|
||||
@@ -131,21 +135,21 @@ in {
|
||||
# Diagnostics
|
||||
{
|
||||
key = "<leader>e";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.open_float()<CR>";
|
||||
desc = "Show diagnostic";
|
||||
}
|
||||
{
|
||||
key = "[d";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.goto_prev()<CR>";
|
||||
desc = "Previous diagnostic";
|
||||
}
|
||||
{
|
||||
key = "]d";
|
||||
mode = ["n"];
|
||||
mode = [ "n" ];
|
||||
silent = true;
|
||||
action = "<cmd>lua vim.diagnostic.goto_next()<CR>";
|
||||
desc = "Next diagnostic";
|
||||
@@ -194,7 +198,7 @@ in {
|
||||
enable = true;
|
||||
format = {
|
||||
enable = true;
|
||||
type = ["alejandra"];
|
||||
type = [ "alejandra" ];
|
||||
#type = "nixfmt";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user