configuration.nix/nvim/standalone.nix
Jalil David Salamé Messina 351e042a7c
[chore] flake.lock: update inputs
Fix for OpenSSH vulnerability:

```
• Updated input 'home-manager':
    'github:nix-community/home-manager/a1fddf0967c33754271761d91a3d921772b30d0e' (2024-06-16)
  → 'github:nix-community/home-manager/391ca6e950c2525b4f853cbe29922452c14eda82' (2024-07-01)
• Updated input 'nixos-hardware':
    'github:NixOS/nixos-hardware/a59f00f5ac65b19382617ba00f360f8bc07ed3ac' (2024-06-29)
  → 'github:NixOS/nixos-hardware/6e253f12b1009053eff5344be5e835f604bb64cd' (2024-07-02)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/89c49874fb15f4124bf71ca5f42a04f2ee5825fd' (2024-06-26)
  → 'github:NixOS/nixpkgs/d032c1a6dfad4eedec7e35e91986becc699d7d69' (2024-07-01)
• Updated input 'nixvim':
    'github:nix-community/nixvim/c062b976eff9f13597c7c23d77a6b3ac677b7fd5' (2024-06-29)
  → 'github:nix-community/nixvim/079c2c479b5707adf0b03f817be30945c92c15cf' (2024-07-01)
• Updated input 'nixvim/flake-parts':
    'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
  → 'github:hercules-ci/flake-parts/c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9' (2024-06-30)
• Updated input 'nixvim/treefmt-nix':
    'github:numtide/treefmt-nix/065a23edceff48f948816b795ea8cc6c0dee7cdf' (2024-06-24)
  → 'github:numtide/treefmt-nix/8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd' (2024-06-30)
• Updated input 'unstable':
    'github:NixOS/nixpkgs/b2852eb9365c6de48ffb0dc2c9562591f652242a' (2024-06-27)
  → 'github:NixOS/nixpkgs/2741b4b489b55df32afac57bc4bfd220e8bf617e' (2024-06-29)
```
2024-07-02 09:29:44 +02:00

91 lines
2.4 KiB
Nix

{pkgs, ...}: {
imports = [./options.nix ./plugins.nix ./mappings.nix ./augroups.nix];
config = {
globals.mapleader = " ";
# Appearance
colorschemes.gruvbox = {
enable = true;
settings = {
bold = true;
transparent_mode = true;
terminal_colors = true;
};
};
clipboard.providers.wl-copy.enable = true;
opts = {
number = true;
relativenumber = true;
colorcolumn = "+1";
cursorline = true;
wrap = false;
splitright = true;
# Tabs & indentation
smarttab = true;
autoindent = true;
smartindent = true;
# Search path
path = ".,/usr/include,**";
wildmenu = true;
hlsearch = true;
incsearch = true;
ignorecase = true; # Search ignores cases
smartcase = true; # Unless it has a capital letter
# Enable local configuration :h 'exrc'
exrc = true; # safe since nvim 0.9
};
extraPlugins = let
plugins = pkgs.unstable.vimPlugins;
extraPlugins = import ./extraPlugins {pkgs = pkgs.unstable;};
in [
plugins.nui-nvim
plugins.nvim-web-devicons
extraPlugins.vim-jjdescription
extraPlugins.nvim-silicon
];
# Formatting & linters
extraPackages = [
pkgs.unstable.silicon
pkgs.unstable.alejandra
pkgs.unstable.luajitPackages.jsregexp
pkgs.unstable.statix
pkgs.unstable.stylua
pkgs.unstable.shfmt
pkgs.unstable.taplo
pkgs.unstable.typos
pkgs.unstable.yamlfmt
];
extraConfigLuaPre = ''
-- Lua Pre Config
if vim.fn.has 'termguicolors' then
-- Enable RGB colors
vim.g.termguicolors = true
end
-- Useful function
local has_words_before = function()
-- unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0
and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match '%s' == nil
end
-- END: Lua Pre Config
'';
extraConfigLua = ''
-- Lua Config
require("nvim-silicon").setup {
theme = "gruvbox-dark",
pad_horiz = 16,
pad_vert = 16,
-- Current buffer name
window_title = function()
return vim.fn.fnamemodify(
vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()),
":t"
)
end,
}
-- END: Lua Config
'';
};
}