Giter Club home page Giter Club logo

jeezyvim's Introduction

JeezyVim

JeezyVim is a declarative NeoVim configuration built with NixVim.

This configuration aims to keep the familiarity of LunarVim while aggressively stripping away excessive IDE-like features to focus on delivering a fast, stable and reliable editor experience.

JeezyVim aims to keep any manually written Lua code to an absolute minimum, and for the purposes of this project any committed Lua files are considered to be technical debt.

This configuration gradually came to be out of the aggressive pruning of plugins that were unncessary for me in dileep-kishore's neovim configuration, which is also an excellent configuration for people looking for a "maximalist" configuration.

image

Usage and Installation

You can run this flake directly to try it out:

nix run github:LGUG2Z/JeezyVim

You can add JeezyVim as an input to your flake configuration like this:

{
    inputs.jeezyvim.url = "github:LGUG2Z/JeezyVim";
}

You can add the inputs.jeezyvim.overlays.default overlay to your nixpkgs to make pkgs.jeezyvim available.

If you are using any of my NixOS starter templates, you would add this to the overlays list in the nixpkgsWithOverlays function in flake.nix.

Extending

Is there a plugin or an LSP that you don't see enabled here, but you would like to enable when you install pkgs.jeezyvim? No problem!

{pkgs, ...}: {
  home.packages = [
    (pkgs.jeezyvim.nixvimExtend {
      # you can put anything under the "Options" section of the NixVim docs here
      # https://nix-community.github.io/nixvim/

      # some examples...

      # all your regular vim options here
      options = {
        textwidth = 120;
      };

      config = {
      # add your own personal keymaps preferences
        keymaps = [
          {
            mode = "n";
            action = ":vsplit<CR>";
            key = "|";
          }

          {
            mode = "n";
            action = ":split<CR>";
            key = "-";
          }
        ];


        plugins = {
          lsp.servers = {
            # full list of language servers you can enable on the left bar here:
            # https://nix-community.github.io/nixvim/plugins/lsp/servers/ansiblels/index.html

            graphql.enable = true;
          };

          # full list of plugins on the left bar here:
          # https://nix-community.github.io/nixvim/plugins/airline/index.html

          markdown-preview.enable = true;
        };
      };
    })
  ];
}

Forking

You can also just fork this repo and use it as a starting point for your own configuration!

Overview

LSPs, formatters and linters are set up for most common languages and configuration file types, as well the common TreeSitter-related plugins you probably remember from LunarVim.

The UI is also largely similar to LunarVim, using the lualine, bufferline and telescope plugins.

The keymaps are what you would expect, and whichkey is also integrated into the configuration to make various plugin keymaps discoverable.

Superpowers

There are a handful of shortcuts that I consider my superpowers in JetBrains IDEs which I have made LSP-equivalents for in this configuration.

  • ,, to rename whatever is under the cursor - trust me, this is the best shortcut I've ever made
  • ,b to peek at the definition of whatever is under the cursor
  • ,B to jump to the definition of whatever is under the cursor, or, if already at the definition, find all usages of the definition in a codebase
  • <C-t> to toggle in and out of the terminal; if the terminal line is focused, you can hit <Esc> to switch to normal mode in the terminal and then <C-t> again to hide it
  • <Space>e to toggle NvimTree, which when opening, will jump to the file in the current buffer
  • <Space>s to live grep
  • <Space>f to search through git-tracked files

jeezyvim's People

Contributors

lgug2z avatar github-actions[bot] avatar

Stargazers

 avatar Mayeu avatar Pablo QP avatar Chris Hutchison avatar Luckas avatar _bqn avatar Kunsang Norbu Tsering avatar DooMWhite avatar  avatar Daniel Kahlenberg avatar Lucas Chaim avatar Rhondar Jackson avatar  avatar zendo avatar  avatar Holtzmann Patrick avatar Pavel Zadorski avatar Will Leinweber avatar Lucas DePaola avatar  avatar

Watchers

 avatar

jeezyvim's Issues

command not found

Hi there, I was going to give jeezyvim a try, and I seem to be missing something as the build happens without error, but the binary is never found. I must have misunderstood something in the instructions.

I did:

  • added jeezyvim.url = "github:LGUG2Z/JeezyVim"; to my inputs - here line 19.
  • passes the reference in on my outputs: outputs = inputs@{ self, nixpkgs, home-manager, nixos-hardware, envycontrol , nix-flatpak, nur, kolide-launcher, hyprswitch, avalanche, jeezyvim, ... }: - here line 39.
  • Then in my nixosConfigurations I add the inputs.jeezyvim.overlays.default - here line 110.
# Overlays
              nixpkgs.overlays = [
                nur.overlay
                inputs.jeezyvim.overlays.default
              ];

I then import this file:

{ pkgs, config, lib, ... }:
let
  cfg = config.cli.jeezyvim;
  username = if builtins.getEnv "SUDO_USER" != "" then
    builtins.getEnv "SUDO_USER"
  else
    builtins.getEnv "USER";
in {

  options = {
    cli.jeezyvim.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = "Enable jeezyvim editor.";
    };
  };

  config = lib.mkIf cfg.enable {



    home-manager.users."${username}" = {
      home = {

        packages = with pkgs;
          [
            jeezyvim # opinionated neovim
          ];

        sessionVariables = { EDITOR = "jvim"; };



      };
    };
  };
}

I then enabled it on my system and rebuilt it without error. here

Thoughts or suggestions?

Thank you!

cannot set treesitter settings

I'm trying to customize your nixos-wsl-starter setup, and I ran into an issue trying to change a treesitter setting in jeezyvim. To test it, I pulled down a fresh copy of the starter repo and then only changed this:

 (jeezyvim.nixvimExtend {
      config.plugins.treesitter.settings.auto_install = true;
    })

based on https://github.com/LGUG2Z/JeezyVim?tab=readme-ov-file#extending and https://nix-community.github.io/nixvim/plugins/treesitter/settings/index.html#pluginstreesittersettings

when i do a nix flake check it gives the error:

error:
       … while checking flake output 'nixosConfigurations'
         at /nix/store/vl7g123kll841jg8dkwv8qslaxjnbbpd-source/flake.nix:83:7:
           82|
           83|       nixosConfigurations.nixos = mkNixosConfiguration {
             |       ^
           84|         hostname = "nixos";

       … while checking the NixOS configuration 'nixosConfigurations.nixos'
         at /nix/store/vl7g123kll841jg8dkwv8qslaxjnbbpd-source/flake.nix:83:7:
           82|
           83|       nixosConfigurations.nixos = mkNixosConfiguration {
             |       ^
           84|         hostname = "nixos";

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The option `plugins.treesitter.settings' does not exist. Definition values:
       - In `<unknown-file>':
           {
             auto_install = true;
           }

Am I trying to set this wrong?

error: attribute 'jeezyvim' missing

Hi there,

(Are You sick of me yet? 😄 )

After making the changes as discussed in issue 3, updating my flake.lock, and running a rebuild, I am now running into:

 error: attribute 'jeezyvim' missing

       at /nix/store/iwyq5kqzffwpcv91vrd0ilz4cxg0qim4-source/modules/cli/nvim/default.nix:30:10:

           29|       home.packages = [
           30|         (pkgs.jeezyvim.nixvimExtend {
             |          ^

I am sure I had changed things correctly, but for reference:

{ pkgs, config, lib, ... }:
let
  cfg = config.cli.nvim;
  username = if builtins.getEnv "SUDO_USER" != "" then
    builtins.getEnv "SUDO_USER"
  else
    builtins.getEnv "USER";
in {

  options = {
    cli.nvim.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = "Enable jeezyvim editor.";
    };
  };

  config = lib.mkIf cfg.enable {

    home-manager.users."${username}" = {

      # home.packages = with pkgs;
      #   [
      #     jeezyvim # opinionated neovim
      #   ];

      home.sessionVariables = { EDITOR = "nvim"; };

      home.packages = [
        (pkgs.jeezyvim.nixvimExtend {
          # you can put anything under the "Options" section of the NixVim docs here
          # https://nix-community.github.io/nixvim/

          # some examples...

          # all your regular vim options here
          options = { textwidth = 120; };

          config = {
            keymaps = [

              # toggle comments
              {
                mode = "n";
                action = ":CommentToggle<CR>";
                key = "<Space>/";
              }
              # toggle copilot-chat
              {
                mode = "n";
                action = ":CopilotChatToggle<CR>";
                key = "<Space>c";
              }
              # explain the active selection
              {
                mode = "n";
                action = ":CopilotChatExplain<CR>";
                key = "<Leader>e";
              }
              # review the selected code
              {
                mode = "n";
                action = ":CopilotChatReview<CR>";
                key = "<Leader>r";
              }
              # fix the selected code
              {
                mode = "n";
                action = ":CopilotChatFix<CR>";
                key = "<Leader>f";
              }
              # optimize the selected code
              {
                mode = "n";
                action = ":CopilotChatOptimize<CR>";
                key = "<Leader>o";
              }
              # add documentation for the selection
              {
                mode = "n";
                action = ":CopilotChatDocs<CR>";
                key = "<Leader>d";
              }
              # generate tests for the code
              {
                mode = "n";
                action = ":CopilotChatTests<CR>";
                key = "<Leader>t";
              }
              # {
              #   mode = "n";
              #   action = ":vsplit<CR>";
              #   key = "|";
              # }

              # {
              #   mode = "n";
              #   action = ":split<CR>";
              #   key = "-";
              # }

            ];
            plugins = {
              lsp.servers = {

                # full list of language servers you can enable on the left bar here:
                # https://nix-community.github.io/nixvim/plugins/lsp/servers/ansiblels/index.html
                bashls.enable = pkgs.lib.mkForce true;
                docker-compose-language-service.enable = true;
                dockerls.enable = pkgs.lib.mkForce false;
                gopls.enable = pkgs.lib.mkForce false;
                graphql.enable = pkgs.lib.mkForce false;
                helm-ls.enable = pkgs.lib.mkForce false;
                html.enable = pkgs.lib.mkForce false;
                htmx.enable = pkgs.lib.mkForce false;
                jsonls.enable = pkgs.lib.mkForce false;
                marksman.enable = pkgs.lib.mkForce false;
                nginx-language-server.enable = pkgs.lib.mkForce false;
                nixd.enable = pkgs.lib.mkForce false;
                pylsp.enable = pkgs.lib.mkForce false;
                rust-analyzer.enable = pkgs.lib.mkForce false;
                svelte.enable = pkgs.lib.mkForce false;
                tailwindcss.enable = pkgs.lib.mkForce false;
                terraformls.enable = pkgs.lib.mkForce false;
                yamlls.enable = pkgs.lib.mkForce false;

              };

              # full list of plugins on the left bar here:
              # https://nix-community.github.io/nixvim/plugins/airline/index.html

              # readme - for config: https://github.com/m4xshen/autoclose.nvim?tab=readme-ov-file#-configuration
              autoclose.enable = pkgs.lib.mkForce false;
              clipboard-image.enable = pkgs.lib.mkForce false;
              markdown-preview.enable = pkgs.lib.mkForce false;
              # copilot-chat.enable = true; #plugin isn't in nixvim yet?
              copilot-cmp.enable = pkgs.lib.mkForce false;
              diffview.enable = pkgs.lib.mkForce false;
              helm.enable = pkgs.lib.mkForce false;
              lazygit.enable = pkgs.lib.mkForce true;
              multicursors.enable = pkgs.lib.mkForce false;
              nix.enable = pkgs.lib.mkForce false;
              nix-develop.enable = pkgs.lib.mkForce false;
              nvim-colorizer.enable = pkgs.lib.mkForce false;
              obsidian.enable = pkgs.lib.mkForce false;
              todo-comments.enable = pkgs.lib.mkForce false;

            };
          };
        })
      ];
    };
  };
}

and nothing changed in my flake:

{
  description = "NixOS configuration for Dustin Krysak";

  inputs = {

    avalanche = {
      url = "github:snowfallorg/avalanche";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";

    nixos-hardware.url = "github:NixOS/nixos-hardware/master";

    envycontrol.url = "github:bayasdev/envycontrol";

    nix-flatpak.url = "github:gmodena/nix-flatpak";

    jeezyvim.url = "github:LGUG2Z/JeezyVim";

    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };

    # Hyprswitch (for windows switching in Hyprland)
    hyprswitch = { url = "github:h3rmt/hyprswitch/release"; };

    # currently used for FF extensions
    nur.url = "github:nix-community/NUR";

    kolide-launcher = {
      url = "github:/kolide/nix-agent/main";
      inputs.nixpkgs.follows = "nixpkgs";
    };

  };

  outputs = inputs@{ self, nixpkgs, home-manager, nixos-hardware, envycontrol
    , nix-flatpak, nur, kolide-launcher, hyprswitch, avalanche, jeezyvim, ... }:
    with inputs;
    let
      nixpkgsConfig = { overlays = [ ]; };
      secrets =
        builtins.fromJSON (builtins.readFile "${self}/secrets/secrets.json");
      username = if builtins.getEnv "SUDO_USER" != "" then
        builtins.getEnv "SUDO_USER"
      else
        builtins.getEnv "USER";
    in {

      nixosConfigurations = {

        # evo = new work laptop hostname
        evo = nixpkgs.lib.nixosSystem {
          # format different due to kolide-launcher
          # nixpkgs.config.allowUnfree = true; only applies to non-flakes.
          specialArgs = {
            inherit inputs secrets;
            pkgs = import nixpkgs {
              system = "x86_64-linux";
              config.allowUnfree = true;
            };
          };
          system = "x86_64-linux";
          modules = [
            ./systems/evo
            nur.nixosModules.nur
            # nixos-hardware.nixosModules.lenovo-thinkpad-x13-yoga
            home-manager.nixosModules.home-manager
            nix-flatpak.nixosModules.nix-flatpak
            kolide-launcher.nixosModules.kolide-launcher
            avalanche.nixosModules."avalanche/desktop"

            {
              home-manager.extraSpecialArgs = { inherit secrets; };
              home-manager.useGlobalPkgs = true;
              home-manager.useUserPackages = true;

              # Overlays
              nixpkgs.overlays = [
                nur.overlay
                avalanche.overlays.default
                jeezyvim.overlays.default
              ];

              # Allow unfree packages
              nixpkgs.config.allowUnfree = true;
            }
          ];
        };

        # rembot = desktop hostname
        rembot = nixpkgs.lib.nixosSystem {
          specialArgs = { inherit inputs secrets; };
          system = "x86_64-linux";
          modules = [
            ./systems/rembot
            nur.nixosModules.nur
            nix-flatpak.nixosModules.nix-flatpak
            home-manager.nixosModules.home-manager
            {
              home-manager.extraSpecialArgs = { inherit secrets; };
              home-manager.useGlobalPkgs = true;
              home-manager.useUserPackages = true;

              # Overlays
              nixpkgs.overlays = [
                nur.overlay
                jeezyvim.overlays.default
                 ];

              # Allow unfree packages
              nixpkgs.config.allowUnfree = true;
            }
          ];
        };

        # nixdo = server hostname
        nixdo = nixpkgs.lib.nixosSystem {
          specialArgs = { inherit inputs secrets; };
          system = "x86_64-linux";
          modules = [
            ./systems/nixdo

          ];

        };

      };

    };
}

I also went to a stripped down config with:

{ pkgs, config, lib, ... }:
let
  cfg = config.cli.nvim;
  username = if builtins.getEnv "SUDO_USER" != "" then
    builtins.getEnv "SUDO_USER"
  else
    builtins.getEnv "USER";
in {

  options = {
    cli.nvim.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = "Enable jeezyvim editor.";
    };
  };

  config = lib.mkIf cfg.enable {

    home-manager.users."${username}" = {

      home.packages = with pkgs;
        [
          jeezyvim # opinionated neovim
        ];

      home.sessionVariables = { EDITOR = "nvim"; };

    };
  };
}

I still got the same error.

Thank you.

unsupported attribute `keymaps'.

Hi there,

I was starting to configure jeezyvim for my needs, but the code is complaining about the location of the keymaps. I compared it against the README, and it "looks" ok to me. I am just trying to determine if it is an issue with my code, or something else within your repo.

This might be because I am trying to create my own module to "enable" jeezyvim on my system with my config.

IE

options = {
    cli.nvim.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = "Enable jeezyvim editor.";
    };
  };

vs

options = { textwidth = 120; };

Thank you!

(loving the approach on this flake.)

CODE

{ pkgs, config, lib, ... }:
let
  cfg = config.cli.nvim;
  username = if builtins.getEnv "SUDO_USER" != "" then
    builtins.getEnv "SUDO_USER"
  else
    builtins.getEnv "USER";
in {

  options = {
    cli.nvim.enable = lib.mkOption {
      type = lib.types.bool;
      default = false;
      description = "Enable jeezyvim editor.";
    };
  };

  config = lib.mkIf cfg.enable {

    home-manager.users."${username}" = {
      home = {

        # packages = with pkgs;
        #   [
        #     jeezyvim # opinionated neovim
        #   ];

        sessionVariables = { EDITOR = "nvim"; };

        packages = [
          (pkgs.jeezyvim.nixvimExtend {
            # you can put anything under the "Options" section of the NixVim docs here
            # https://nix-community.github.io/nixvim/

            # some examples...

            # all your regular vim options here
            options = { textwidth = 120; };

            # add your own personal keymaps preferences
            keymaps = [

              # toggle comments
              {
                mode = "n";
                action = ":CommentToggle<CR>";
                key = "<Space>/";
              }
              # toggle copilot-chat
              {
                mode = "n";
                action = ":CopilotChatToggle<CR>";
                key = "<Space>c";
              }
              # explain the active selection
              {
                mode = "n";
                action = ":CopilotChatExplain<CR>";
                key = "<Leader>e";
              }
              # review the selected code
              {
                mode = "n";
                action = ":CopilotChatReview<CR>";
                key = "<Leader>r";
              }
              # fix the selected code
              {
                mode = "n";
                action = ":CopilotChatFix<CR>";
                key = "<Leader>f";
              }
              # optimize the selected code
              {
                mode = "n";
                action = ":CopilotChatOptimize<CR>";
                key = "<Leader>o";
              }
              # add documentation for the selection
              {
                mode = "n";
                action = ":CopilotChatDocs<CR>";
                key = "<Leader>d";
              }
              # generate tests for the code
              {
                mode = "n";
                action = ":CopilotChatTests<CR>";
                key = "<Leader>t";
              }
              # {
              #   mode = "n";
              #   action = ":vsplit<CR>";
              #   key = "|";
              # }

              # {
              #   mode = "n";
              #   action = ":split<CR>";
              #   key = "-";
              # }
            ];

            plugins = {
              lsp.servers = {
                # full list of language servers you can enable on the left bar here:
                # https://nix-community.github.io/nixvim/plugins/lsp/servers/ansiblels/index.html
                bashls.enable = true;
                docker-compose-language-service.enable = true;
                dockerls.enable = false;
                gopls.enable = false;
                graphql.enable = false;
                helm-ls.enable = false;
                html.enable = false;
                htmx.enable = false;
                jsonls.enable = false;
                marksman.enable = false;
                nginx-language-server.enable = false;
                nixd.enable = false;
                pylsp.enable = false;
                rust-analyzer.enable = false;
                svelte.enable = false;
                tailwindcss.enable = false;
                terraformls.enable = false;
                yamlls.enable = false;
              };

              # full list of plugins on the left bar here:
              # https://nix-community.github.io/nixvim/plugins/airline/index.html

              # readme - for config: https://github.com/m4xshen/autoclose.nvim?tab=readme-ov-file#-configuration
              autoclose.enable = false;
              clipboard-image.enable = false;
              markdown-preview.enable = false;
              copilot-chat.enable = true;
              copilot-cmp.enable = false;
              diffview.enable = false;
              helm.enable = false;
              lazygit.enable = true;
              multicursors.enable = false;
              nix.enable = false;
              nix-develop.enable  = false;
              nvim-colorizer.enable = false;
              obsidian.enable = false;
              todo-comments.enable = false;
            };
          })
        ];
      };
    };
  };
}

ERROR

error: Module `:anon-1:anon-2' has an unsupported attribute `keymaps'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: keymaps plugins) into the explicit `config' attribute.

readme error missing ";"

Hi there, in your example code, I think you are missing a ";"

{pkgs, ...}: {
  home.packages = [
    (pkgs.jeezyvim.nixvimExtend {
      # you can put anything under the "Options" section of the NixVim docs here
      # https://nix-community.github.io/nixvim/

      # some examples...

      # all your regular vim options here
      options = {
        textwidth = 120;
      };

      # add your own personal keymaps preferences
      keymaps = [
        {
          mode = "n";
          action = ":vsplit<CR>";
          key = "|";
        }

        {
          mode = "n";
          action = ":split<CR>";
          key = "-";
        }
      ];


      plugins = {
        lsp.servers = {
          # full list of language servers you can enable on the left bar here:
          # https://nix-community.github.io/nixvim/plugins/lsp/servers/ansiblels/index.html

          graphql.enable = true;
        };

        # full list of plugins on the left bar here:
        # https://nix-community.github.io/nixvim/plugins/airline/index.html

        markdown-preview.enable = true;
      };
    })
  ] # <---------------------------------------- HERE
}

My editor sure complains. 👍

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.