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 clonednvim
folder into it. Then create a file calleddeafult.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.
Top comments (0)