fix(nvim): Added fonts for guivim

Disable neoscroll for guivim and added fonts for guivim
Added options for noice.nvim
This commit is contained in:
uttarayan21
2024-03-23 17:52:07 +05:30
parent c3c1e56ed3
commit e4c98ece6f
4 changed files with 65 additions and 33 deletions

View File

@@ -110,15 +110,11 @@ in {
gopls.enable = true; gopls.enable = true;
nil_ls = { nil_ls = {
enable = true; enable = true;
settings = { settings.formatting.command = [
formatting = { "${pkgs.alejandra}/bin/alejandra"
command = [ # "${pkgs.nixfmt}/bin/nixfmt"
"${pkgs.alejandra}/bin/alejandra" # "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"
# "${pkgs.nixfmt}/bin/nixfmt" ];
# "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt"
];
};
};
}; };
clangd.enable = true; clangd.enable = true;
lua-ls.enable = true; lua-ls.enable = true;
@@ -127,11 +123,33 @@ in {
pylyzer.enable = true; pylyzer.enable = true;
# rust-analyzer.enable = true; # rust-analyzer.enable = true;
}; };
onAttach =
/*
lua
*/
''
if client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(bufnr, true)
end
'';
}; };
noice = { noice = {
enable = true; enable = true;
notify.enabled = false; notify.enabled = false;
lsp.override = {
"vim.lsp.util.convert_input_to_markdown_lines" = true;
"vim.lsp.util.stylize_markdown" = true;
"cmp.entry.get_documentation" = true;
};
presets = {
bottom_search = false;
command_palette = true;
long_message_to_split = true;
inc_rename = false;
lsp_doc_border = true;
};
}; };
fidget = { fidget = {
enable = true; enable = true;
@@ -447,8 +465,10 @@ in {
}, },
["core.dirman"] = { ["core.dirman"] = {
config = { config = {
default_workspace = "Notes",
open_last_workspace = true,
workspaces = { workspaces = {
default = "~/Nextcloud/Notes", Notes = "~/Nextcloud/Notes",
Work = "~/Nextcloud/Work", Work = "~/Nextcloud/Work",
} }
} }
@@ -468,6 +488,7 @@ in {
use_local_fs = false, use_local_fs = false,
enable_builtin = false, enable_builtin = false,
default_remote = {"upstream", "origin"}; default_remote = {"upstream", "origin"};
default_merge_method = "squash";
}) })
local rr_dap = require('nvim-dap-rr') local rr_dap = require('nvim-dap-rr')
@@ -481,7 +502,13 @@ in {
dap.configurations.rust = { rr_dap.get_rust_config() } dap.configurations.rust = { rr_dap.get_rust_config() }
dap.configurations.cpp = { rr_dap.get_config() } dap.configurations.cpp = { rr_dap.get_config() }
require('neoscroll').setup() if not vim.g.neovide then
require('neoscroll').setup()
else
vim.o.guifont = "Hasklug Nerd Font Mono:h13"
end
do do
function setup() function setup()
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
@@ -489,7 +516,8 @@ in {
dynamicRegistration = false, dynamicRegistration = false,
lineFoldingOnly = true lineFoldingOnly = true
} }
local language_servers = require("lspconfig").util.available_servers() -- or list servers manually like {'gopls', 'clangd'} -- local language_servers = require("lspconfig").util.available_servers() -- or list servers manually like {'gopls', 'clangd'}
local language_servers = {"rust_analyzer"};
for _, ls in ipairs(language_servers) do for _, ls in ipairs(language_servers) do
require('lspconfig')[ls].setup({ require('lspconfig')[ls].setup({
capabilities = capabilities capabilities = capabilities

View File

@@ -33,7 +33,6 @@
url = "github:uttarayan21/anyrun-rink"; url = "github:uttarayan21/anyrun-rink";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ironbar = { ironbar = {
url = "github:JakeStanger/ironbar"; url = "github:JakeStanger/ironbar";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -46,18 +45,12 @@
url = "github:nix-community/nixvim"; url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# rustaceanvim = {
# url = "github:mrcjkb/rustaceanvim";
# inputs.nixpkgs.follows = "nixpkgs";
# };
nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.url = "github:Mic92/nix-index-database";
music-player = { music-player = {
url = "github:tsirysndr/music-player"; url = "github:tsirysndr/music-player";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";
hyprlock = { hyprlock = {
url = "github:hyprwm/hyprlock"; url = "github:hyprwm/hyprlock";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@@ -26,6 +26,10 @@
nix.gc.dates = "daily"; nix.gc.dates = "daily";
nix.gc.options = "--delete-older-than +5"; nix.gc.options = "--delete-older-than +5";
boot.lanzaboote = { boot.lanzaboote = {
enable = true; enable = true;
pkiBundle = "/etc/secureboot"; pkiBundle = "/etc/secureboot";
@@ -172,6 +176,12 @@
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
}; };
nix-ld = {
enable = true;
libraries = with pkgs; [
libglvnd
];
};
}; };
security.rtkit.enable = true; security.rtkit.enable = true;

View File

@@ -213,32 +213,33 @@
rest-nvim-src = final.pkgs.fetchFromGitHub { rest-nvim-src = final.pkgs.fetchFromGitHub {
owner = "rest-nvim"; owner = "rest-nvim";
repo = "rest.nvim"; repo = "rest.nvim";
rev = "9023802373bfcef55cd4907ac3135e0737aa337b"; rev = "64175b161b61b6807b4c6f3f18dd884325cf04e0";
# sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0338"; # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0338";
# sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0339"; # sha256 = "sha256-3EC0j/hEbdQ8nJU0I+LGmE/zNnglO/FrP/6POer0339";
sha256 = "sha256-CyJyeODZbfWDAvSzzqrAEcFmLASxu3GBdF5VxSocwbY"; sha256 = "sha256-w/Z9lHu99gpbmrDCw/MEUDy6jyABsC7K5dbbl3K+HWk=";
}; };
in { in {
vimPlugins = vimPlugins =
prev.vimPlugins prev.vimPlugins
// { // {
rest-nvim = final.neovimUtils.buildNeovimPlugin { rest-nvim = final.neovimUtils.buildNeovimPlugin {
pname = "rest.nvim";
version = "scm-1";
# src = rest-nvim-src;
# buildInputs = with final.pkgs.lua51Packages; [lua lua-curl mimetypes nvim-nio xml2lua];
};
};
lua51Packages =
prev.lua51Packages
// {
rest-nvim = final.lua.buildLuarocksPackage {
pname = "rest.nvim"; pname = "rest.nvim";
version = "scm-1"; version = "scm-1";
src = rest-nvim-src; src = rest-nvim-src;
buildInputs = with final.lua51Packages; [lua lua-curl mimetypes nvim-nio xml2lua]; rockspecVersion = "0.2-1";
buildInputs = with final.pkgs.lua51Packages; [lua lua-curl mimetypes nvim-nio xml2lua];
}; };
}; };
# lua51Packages =
# prev.lua51Packages
# // {
# rest-nvim = final.lua.buildLuarocksPackage {
# pname = "rest.nvim";
# version = "scm-1";
# src = rest-nvim-src;
# buildInputs = with final.lua51Packages; [lua lua-curl mimetypes nvim-nio xml2lua];
# };
# };
}; };
catppuccin = final: prev: { catppuccin = final: prev: {
pythonPackagesExtensions = pythonPackagesExtensions =
@@ -277,7 +278,7 @@ in [
catppuccin catppuccin
(import (builtins.fetchTarball { (import (builtins.fetchTarball {
url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz";
sha256 = "sha256:1k1d7bkx6kdqcvawsm2mm2rd8a0apfkx5y6m1lzr8lxv3bimp4ry"; sha256 = "sha256:143qm7bj651v2pwzq4sf5sp33g733inixf2b98sxf89ia0cabaqn";
})) }))
# rest-nvim-overlay # rest-nvim-overlay
# inputs.rustaceanvim.overlays.default # inputs.rustaceanvim.overlays.default