1
0
Fork 0

nvim: Cleanup configuration

This commit is contained in:
Daniel Kempkens 2023-03-27 21:19:01 +02:00
parent d29da3cfd8
commit a71c541ea2
Signed by: daniel
SSH key fingerprint: SHA256:Ks/MyhQYcPRQiwMKLAKquWCdCPe3JXlb1WttgnAoSeM
2 changed files with 214 additions and 209 deletions

View file

@ -35,7 +35,7 @@
;; Configure Linters per FT
(set lint.linters_by_ft {:dockerfile [:hadolint]
:elixir [:credo]
;:fennel [:fennel]
:fennel [:fennel]
:fish [:fish]
:java [:checkstyle]
:nix [:deadnix :nix :statix]

View file

@ -1,10 +1,5 @@
{ pkgs, config, lib, ... }:
let
customPlugins = import ./plugins.nix { inherit pkgs; };
nvim-spell-directory = "${config.xdg.configHome}/nvim/spell";
in
{
programs.neovim = {
enable = true;
@ -16,7 +11,7 @@ in
withRuby = false;
withPython3 = false;
extraLuaPackages = _: [ pkgs.luarocks-jsregexp ];
extraLuaPackages = luaPkgs: with luaPkgs; [ jsregexp readline ];
extraPackages = with pkgs; [
git
@ -42,12 +37,14 @@ in
checkstyle
deadnix
hadolint
lua51Packages.fennel
luajitPackages.fennel
fnlfmt
shellcheck
shfmt
statix
yamllint
] ++ lib.optionals pkgs.stdenv.isDarwin [
xcbuild
];
extraLuaConfig =
@ -97,7 +94,11 @@ in
require('configuration.init')
'';
plugins = (with customPlugins; [
plugins =
let
customPlugins = import ./plugins.nix { inherit pkgs; };
in
(with customPlugins; [
# Fixes
impatient-nvim
@ -332,7 +333,7 @@ in
xdg.configFile."nvim" = {
source = pkgs.runCommand "nvim-fennel-files"
{
nativeBuildInputs = with pkgs; [ lua51Packages.fennel stylua ];
nativeBuildInputs = with pkgs; [ luajitPackages.fennel stylua ];
} ''
mkdir -p $out/lua/configuration
mkdir -p $out/lua/nifoc/utils
@ -409,7 +410,11 @@ in
echo 'Done'
'';
file = {
file =
let
nvim-spell-directory = "${config.xdg.configHome}/nvim/spell";
in
{
"${nvim-spell-directory}/de.utf-8.spl".source = builtins.fetchurl {
url = "http://ftp.vim.org/pub/vim/runtime/spell/de.utf-8.spl";
sha256 = "73c7107ea339856cdbe921deb92a45939c4de6eb9c07261da1b9dd19f683a3d1";