add neovim

This commit is contained in:
Aditya 2024-04-11 18:12:59 +05:30
parent f1bbcb2cd1
commit dd400f5b24
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU
3 changed files with 56 additions and 44 deletions

View file

@ -106,50 +106,6 @@
"electron-25.9.0"
];
programs.neovim = {
enable = false;
defaultEditor = true;
# coc.enable = true;
# extraLuaConfig = ''
# for _, source in ipairs {
# "astronvim.bootstrap",
# "astronvim.options",
# "astronvim.lazy",
# "astronvim.autocmds",
# "astronvim.mappings",
# } do
# local status_ok, fault = pcall(require, source)
# if not status_ok then vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault
# ) end
# end
#
# if astronvim.default_colorscheme then
# if not pcall(vim.cmd.colorscheme, astronvim.default_colorscheme) then
# requrie("astronvim.utils").notify(
# "Error setting up colorscheme: " .. astronvim.default_colorscheme,
# vim.log.levels.ERROR
# )
# end
# end
#
# require("astronvim.utils").conditional_func(astronvim.user_opts("polish", nil, false), true)
# '';
#
# plugins = (with pkgs.vimPlugins; [
# rust-vim
# rust-tools-nvim
# coc-rust-analyzer
# nvim-treesitter-parsers.rust
# nvim-treesitter-parsers.cpp
# nvim-treesitter-parsers.c
# nvim-treesitter-parsers.latex
# coc-rls
# coc-clangd
# clangd_extensions-nvim
# vim-clang-format
# ]);
};
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [

View file

@ -2,6 +2,7 @@
imports = [
./bash
./kitty
./neovim
./session-vars
./tmux
./zsh
@ -11,6 +12,7 @@
bash.enable = lib.mkDefault true;
kitty.enable = lib.mkDefault true;
neovim.enable = lib.mkDefault true;
tmux.enable = lib.mkDefault true;
zsh.enable = lib.mkDefault true;
}

View file

@ -0,0 +1,54 @@
{
config,
lib,
...
}: {
options = {
neovim.enable = lib.mkEnableOption "enable neovim";
};
config = lib.mkIf config.neovim.enable {
programs.neovim = {
enable = false;
defaultEditor = true;
# coc.enable = true;
# extraLuaConfig = ''
# for _, source in ipairs {
# "astronvim.bootstrap",
# "astronvim.options",
# "astronvim.lazy",
# "astronvim.autocmds",
# "astronvim.mappings",
# } do
# local status_ok, fault = pcall(require, source)
# if not status_ok then vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault
# ) end
# end
#
# if astronvim.default_colorscheme then
# if not pcall(vim.cmd.colorscheme, astronvim.default_colorscheme) then
# requrie("astronvim.utils").notify(
# "Error setting up colorscheme: " .. astronvim.default_colorscheme,
# vim.log.levels.ERROR
# )
# end
# end
#
# require("astronvim.utils").conditional_func(astronvim.user_opts("polish", nil, false), true)
# '';
#
# plugins = (with pkgs.vimPlugins; [
# rust-vim
# rust-tools-nvim
# coc-rust-analyzer
# nvim-treesitter-parsers.rust
# nvim-treesitter-parsers.cpp
# nvim-treesitter-parsers.c
# nvim-treesitter-parsers.latex
# coc-rls
# coc-clangd
# clangd_extensions-nvim
# vim-clang-format
# ]);
};
};
}