feat(nvim): Added neovim command to reload and sqlfmt

This commit is contained in:
Uttarayan Mondal
2024-04-04 20:26:11 +05:30
parent a478e7cca6
commit ae43c82e5c
3 changed files with 36 additions and 3 deletions

View File

@@ -66,7 +66,6 @@ in {
alejandra alejandra
pkg-config pkg-config
devenv devenv
python312Packages.sqlparse
sleek sleek
# Misc # Misc
@@ -96,6 +95,7 @@ in {
(pkgs.mpv-unwrapped.override {sixelSupport = true;}) {}) (pkgs.mpv-unwrapped.override {sixelSupport = true;}) {})
] ]
++ lib.optionals device.isLinux [ ++ lib.optionals device.isLinux [
ferdium
psst psst
sony-headphones-client sony-headphones-client
abaddon abaddon
@@ -320,6 +320,27 @@ in {
file = { file = {
".config/fish/themes".source = pkgs.catppuccinThemes.fish + "/themes"; ".config/fish/themes".source = pkgs.catppuccinThemes.fish + "/themes";
".cargo/config.toml".text =
/*
toml
*/
''
[alias]
lldb = ["with", "rust-lldb", "--"]
[net]
git-fetch-with-cli = true
# [target.aarch64-apple-darwin]
# linker = "clang"
# rustflags = ["-C", "link-arg=-fuse-ld=${pkgs.mold}/bin/mold"]
[registries.catscii]
index = "https://git.shipyard.rs/catscii/crate-index.git"
[http]
user-agent = "shipyard J0/QFq2Sa5y6nTxJQAb8t+e/3qLSub1/sa3zn0leZv6LKG/zmQcoikT9U3xPwbzp8hQ="
'';
}; };
sessionVariables = { sessionVariables = {

2
flake.lock generated
View File

@@ -1188,7 +1188,7 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-pflBfIdyFBeG+5Rq5Oq41zNu8w4eILzlj2tcjxal/Oo=", "narHash": "sha256-tCS3U1V/RGNFT3FFr8NGpCDPkInN0AjVUYQIi2PlMOw=",
"path": "./neovim", "path": "./neovim",
"type": "path" "type": "path"
}, },

View File

@@ -306,7 +306,7 @@ in rec {
# "<leader>ee" = "[[<cmd>Rest run<cr>]]"; # "<leader>ee" = "[[<cmd>Rest run<cr>]]";
"<leader>ee" = "[[<Plug>RestNvim]]"; "<leader>ee" = "[[<Plug>RestNvim]]";
"<leader>el" = "[[<cmd>Rest run last<cr>]]"; "<leader>el" = "[[<cmd>Rest run last<cr>]]";
"<leader>hh" = "[[<cmd>DevdocsOpenFloat<cr>]]"; "<leader>hh" = "[[<cmd>DevdocsOpen<cr>]]";
"<leader>hl" = "[[<cmd>DevdocsToggle<cr>]]"; "<leader>hl" = "[[<cmd>DevdocsToggle<cr>]]";
"<leader><leader>" = "'<c-^>'"; "<leader><leader>" = "'<c-^>'";
"<leader>n" = "[[<cmd>bnext<cr>]]"; "<leader>n" = "[[<cmd>bnext<cr>]]";
@@ -532,6 +532,18 @@ in rec {
}) })
end) end)
vim.g.rustaceanvim["tools"] = { enable_clippy = false }; vim.g.rustaceanvim["tools"] = { enable_clippy = false };
vim.api.nvim_create_user_command('Reso',
function()
pcall(vim.cmd'source ~/.config/nvim/init.lua')
end,
{})
vim.api.nvim_create_user_command('Sqlfmt',
function()
pcall(vim.cmd'%!${pkgs.sleek}/bin/sleek')
end,
{})
''; '';
package = pkgs.neovim-nightly; package = pkgs.neovim-nightly;
opts = { opts = {