feat(neovim): use nerdfonts & avoid emojis that break neovim
Some emojis break rendering in neovim/kitty due to width issues. Can potentially be fixed by switching to a different terminal emulator but I haven't found one matching my other needs yet.
This commit is contained in:
parent
f59ae17641
commit
5bc58270bb
|
@ -7,19 +7,19 @@ function LspStatus()
|
|||
local hints = #vim.diagnostic.get(0, { severity = vim.diagnostic.severity.HINT })
|
||||
if (errors > 0 or warnings > 0 or infos > 0 or hints > 0) then
|
||||
if errors > 0 then
|
||||
sl = sl .. "E" .. errors
|
||||
sl = sl .. " " .. errors
|
||||
end
|
||||
if warnings > 0 then
|
||||
sl = sl .. " W" .. warnings
|
||||
sl = sl .. " " .. warnings
|
||||
end
|
||||
if infos > 0 then
|
||||
sl = sl .. " I" .. infos
|
||||
sl = sl .. " " .. infos
|
||||
end
|
||||
if hints > 0 then
|
||||
sl = sl .. " H" .. hints
|
||||
sl = sl .. " " .. hints
|
||||
end
|
||||
else
|
||||
sl = sl .. "🗸"
|
||||
sl = sl .. ""
|
||||
end
|
||||
end
|
||||
return sl
|
||||
|
|
|
@ -9,10 +9,13 @@ in {
|
|||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
status.symbol = "❌ ";
|
||||
status.disabled = false;
|
||||
status.symbol = "❌ ";
|
||||
aws.disabled = true;
|
||||
gcloud.disabled = true;
|
||||
|
||||
# kitty/neovim don't play well with multi-width emojis
|
||||
nix_shell.symbol = " ";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -12,18 +12,25 @@
|
|||
|
||||
environment.systemPackages = with pkgs; [ wget curl openssl neovim ];
|
||||
|
||||
# TODO once nerdfonts 2.2.0 is released switch to NerdFontsSymbolsOnly
|
||||
# Also needs to be added to known fonts in nixpkgs:
|
||||
# https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/data/fonts/nerdfonts/shas.nix
|
||||
fonts.fonts = with pkgs; [
|
||||
fira-code
|
||||
noto-fonts
|
||||
noto-fonts-extra
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
# (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
fira-code
|
||||
];
|
||||
fonts.fontconfig.defaultFonts = {
|
||||
serif = [ "Noto Serif" "Noto Color Emoji" ];
|
||||
sansSerif = [ "Noto Sans" "Noto Color Emoji" ];
|
||||
monospace = [ "Fira Code" "Noto Color Emoji" ];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
# monospace = [ "Fira Code" "Noto Color Emoji" "Symbols-1000-em Nerd Font" ];
|
||||
# emoji = [ "Noto Color Emoji" "Symbols-1000-em Nerd Font" ];
|
||||
monospace = [ "Fira Code" "Noto Color Emoji" "FiraCode Nerd Font" ];
|
||||
emoji = [ "Noto Color Emoji" "FiraCode Nerd Font" ];
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
|
|
Loading…
Reference in a new issue