How to turn NEOVIM into an IDE-like code editor in NIXOS?

Welcome to my optimized Laravel development setup featuring Nvim with LazyVim integration. This configuration is tailored to enhance productivity and streamline the development workflow for Laravel projects.

Features:​

Efficient Code Editi…


This content originally appeared on DEV Community and was authored by Mirsoli Mirzaahmad õğli

Welcome to my optimized Laravel development setup featuring Nvim with LazyVim integration. This configuration is tailored to enhance productivity and streamline the development workflow for Laravel projects.

Features:​

  • Efficient Code Editing: Leverage the power of Nvim’s fast, extensible code editing with LazyVim’s user-friendly enhancements.
  • Laravel-Specific Tools: Pre-configured tools and plugins to support Laravel development, including syntax highlighting, code completion, and route navigation.
  • Enhanced Productivity: Enjoy a suite of features aimed at boosting efficiency, such as automatic code formatting, linting, and integrated terminal support.
  • Customizable: Easily adapt the setup to your preferences with a modular and customizable configuration.

Setup​:

  • Clone this repository:
git clone https://github.com/codahiri/dotfiles.git ~/.config/nvim
  • Remove the .git folder, so you can add it to your own repo later
rm -rf ./nvim/.git
  • Create a folder called neovim and copy the cloned nvim folder into it. Then create a file called deafult.nix and add the following code inside it:
{
  config,
  lib,
  pkgs,
  ...
}:
###############################################################################
#
#  NvChad's configuration and all its dependencies(lsp, formatter, etc.)
#
#e#############################################################################
let
  shellAliases = {
    v = "nvim";
    vdiff = "nvim -d";
  };
  # the path to nvim directory
  # to make this symlink work, we need to git clone this repo to your home directory.
  configPath = "${config.home.homeDirectory}/nixos-config/modules/home/neovim/nvim";
in
{
  xdg.configFile."nvim".source = config.lib.file.mkOutOfStoreSymlink configPath;

  home.shellAliases = shellAliases;
  programs.nushell.shellAliases = shellAliases;

  programs = {
    neovim = {
      enable = true;
      package = pkgs.neovim-unwrapped;

      # defaultEditor = true; # set EDITOR at system-wide level
      viAlias = true;
      vimAlias = true;

      # These environment variables are needed to build and run binaries
      # with external package managers like mason.nvim.
      #
      # LD_LIBRARY_PATH is also needed to run the non-FHS binaries downloaded by mason.nvim.
      # it will be set by nix-ld, so we do not need to set it here again.
      extraWrapperArgs = with pkgs; [
        # LIBRARY_PATH is used by gcc before compilation to search directories
        # containing static and shared libraries that need to be linked to your program.
        "--suffix"
        "LIBRARY_PATH"
        ":"
        "${lib.makeLibraryPath [
          stdenv.cc.cc
          zlib
        ]}"

        # PKG_CONFIG_PATH is used by pkg-config before compilation to search directories
        # containing .pc files that describe the libraries that need to be linked to your program.
        "--suffix"
        "PKG_CONFIG_PATH"
        ":"
        "${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [
          stdenv.cc.cc
          zlib
        ]}"
      ];

      # Currently we use lazy.nvim as neovim's package manager, so comment this one.
      #
      # NOTE: These plugins will not be used by astronvim by default!
      # We should install packages that will compile locally or download FHS binaries via Nix!
      # and use lazy.nvim's `dir` option to specify the package directory in nix store.
      # so that these plugins can work on NixOS.
      #
      # related project:
      #  https://github.com/b-src/lazy-nix-helper.nvim
      # plugins = with pkgs.vimPlugins; [
      #   # search all the plugins using https://search.nixos.org/packages
      #   telescope-fzf-native-nvim

      #   nvim-treesitter.withAllGrammars
      # ];
    };
  };
}
  • Build NixOS and Start Neovim!
# build nixos
sudo nixos-rebuild switch --flake ./#yourhostname

# start nvim
nvim

To get started, clone the repository and follow the installation instructions in the README. This repository includes all necessary configurations, plugins, and dependencies to get your Laravel development environment up and running quickly.


This content originally appeared on DEV Community and was authored by Mirsoli Mirzaahmad õğli


Print Share Comment Cite Upload Translate Updates
APA

Mirsoli Mirzaahmad õğli | Sciencx (2025-03-24T15:04:47+00:00) How to turn NEOVIM into an IDE-like code editor in NIXOS?. Retrieved from https://www.scien.cx/2025/03/24/how-to-turn-neovim-into-an-ide-like-code-editor-in-nixos/

MLA
" » How to turn NEOVIM into an IDE-like code editor in NIXOS?." Mirsoli Mirzaahmad õğli | Sciencx - Monday March 24, 2025, https://www.scien.cx/2025/03/24/how-to-turn-neovim-into-an-ide-like-code-editor-in-nixos/
HARVARD
Mirsoli Mirzaahmad õğli | Sciencx Monday March 24, 2025 » How to turn NEOVIM into an IDE-like code editor in NIXOS?., viewed ,<https://www.scien.cx/2025/03/24/how-to-turn-neovim-into-an-ide-like-code-editor-in-nixos/>
VANCOUVER
Mirsoli Mirzaahmad õğli | Sciencx - » How to turn NEOVIM into an IDE-like code editor in NIXOS?. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/03/24/how-to-turn-neovim-into-an-ide-like-code-editor-in-nixos/
CHICAGO
" » How to turn NEOVIM into an IDE-like code editor in NIXOS?." Mirsoli Mirzaahmad õğli | Sciencx - Accessed . https://www.scien.cx/2025/03/24/how-to-turn-neovim-into-an-ide-like-code-editor-in-nixos/
IEEE
" » How to turn NEOVIM into an IDE-like code editor in NIXOS?." Mirsoli Mirzaahmad õğli | Sciencx [Online]. Available: https://www.scien.cx/2025/03/24/how-to-turn-neovim-into-an-ide-like-code-editor-in-nixos/. [Accessed: ]
rf:citation
» How to turn NEOVIM into an IDE-like code editor in NIXOS? | Mirsoli Mirzaahmad õğli | Sciencx | https://www.scien.cx/2025/03/24/how-to-turn-neovim-into-an-ide-like-code-editor-in-nixos/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.