mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
build(flake): add sumneko lsp in PATH
and reformatted the file
This commit is contained in:
parent
12fe197cff
commit
29cd072351
@ -23,24 +23,25 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
# a development binary to help debug issues
|
# a development binary to help debug issues
|
||||||
neovim-debug = let
|
neovim-debug =
|
||||||
stdenv = if pkgs.stdenv.isLinux then pkgs.llvmPackages_latest.stdenv else pkgs.stdenv;
|
let
|
||||||
in
|
stdenv = if pkgs.stdenv.isLinux then pkgs.llvmPackages_latest.stdenv else pkgs.stdenv;
|
||||||
|
in
|
||||||
((neovim.override {
|
((neovim.override {
|
||||||
lua = pkgs.luajit;
|
lua = pkgs.luajit;
|
||||||
inherit stdenv;
|
inherit stdenv;
|
||||||
}).overrideAttrs (oa: {
|
}).overrideAttrs (oa: {
|
||||||
|
|
||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
NIX_CFLAGS_COMPILE = " -ggdb -Og";
|
NIX_CFLAGS_COMPILE = " -ggdb -Og";
|
||||||
|
|
||||||
cmakeBuildType = "Debug";
|
cmakeBuildType = "Debug";
|
||||||
cmakeFlags = oa.cmakeFlags ++ [
|
cmakeFlags = oa.cmakeFlags ++ [
|
||||||
"-DMIN_LOG_LEVEL=0"
|
"-DMIN_LOG_LEVEL=0"
|
||||||
];
|
];
|
||||||
|
|
||||||
disallowedReferences = [];
|
disallowedReferences = [ ];
|
||||||
}));
|
}));
|
||||||
|
|
||||||
# for neovim developers, beware of the slow binary
|
# for neovim developers, beware of the slow binary
|
||||||
neovim-developer =
|
neovim-developer =
|
||||||
@ -68,9 +69,11 @@
|
|||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
|
|
||||||
pythonEnv = pkgs.python3.withPackages(ps: [
|
lua = pkgs.lua5_1;
|
||||||
|
|
||||||
|
pythonEnv = pkgs.python3.withPackages (ps: [
|
||||||
ps.msgpack
|
ps.msgpack
|
||||||
ps.flake8 # for 'make pylint'
|
ps.flake8 # for 'make pylint'
|
||||||
]);
|
]);
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
@ -80,14 +83,16 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
pylint = pkgs.runCommandNoCC "pylint" {
|
pylint = pkgs.runCommandNoCC "pylint"
|
||||||
nativeBuildInputs = [ pythonEnv ];
|
{
|
||||||
preferLocalBuild = true;
|
nativeBuildInputs = [ pythonEnv ];
|
||||||
|
preferLocalBuild = true;
|
||||||
} "make -C ${./..} pylint > $out";
|
} "make -C ${./..} pylint > $out";
|
||||||
|
|
||||||
shlint = pkgs.runCommandNoCC "shlint" {
|
shlint = pkgs.runCommandNoCC "shlint"
|
||||||
nativeBuildInputs = [ pkgs.shellcheck ];
|
{
|
||||||
preferLocalBuild = true;
|
nativeBuildInputs = [ pkgs.shellcheck ];
|
||||||
|
preferLocalBuild = true;
|
||||||
} "make -C ${./..} shlint > $out";
|
} "make -C ${./..} shlint > $out";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -100,38 +105,40 @@
|
|||||||
|
|
||||||
defaultApp = apps.nvim;
|
defaultApp = apps.nvim;
|
||||||
|
|
||||||
devShell = let
|
devShells = {
|
||||||
in
|
default = pkgs.neovim-developer.overrideAttrs (oa: {
|
||||||
pkgs.neovim-developer.overrideAttrs(oa: {
|
|
||||||
|
|
||||||
buildInputs = with pkgs; oa.buildInputs ++ [
|
buildInputs = with pkgs; oa.buildInputs ++ [
|
||||||
cmake
|
cmake
|
||||||
pythonEnv
|
lua.pkgs.luacheck
|
||||||
include-what-you-use # for scripts/check-includes.py
|
sumneko-lua-language-server
|
||||||
jq # jq for scripts/vim-patch.sh -r
|
pythonEnv
|
||||||
shellcheck # for `make shlint`
|
include-what-you-use # for scripts/check-includes.py
|
||||||
doxygen # for script/gen_vimdoc.py
|
jq # jq for scripts/vim-patch.sh -r
|
||||||
clang-tools # for clangd to find the correct headers
|
shellcheck # for `make shlint`
|
||||||
];
|
doxygen # for script/gen_vimdoc.py
|
||||||
|
clang-tools # for clangd to find the correct headers
|
||||||
|
];
|
||||||
|
|
||||||
shellHook = oa.shellHook + ''
|
shellHook = oa.shellHook + ''
|
||||||
export NVIM_PYTHON_LOG_LEVEL=DEBUG
|
export NVIM_PYTHON_LOG_LEVEL=DEBUG
|
||||||
export NVIM_LOG_FILE=/tmp/nvim.log
|
export NVIM_LOG_FILE=/tmp/nvim.log
|
||||||
export ASAN_SYMBOLIZER_PATH=${pkgs.llvm_11}/bin/llvm-symbolizer
|
export ASAN_SYMBOLIZER_PATH=${pkgs.llvm_11}/bin/llvm-symbolizer
|
||||||
|
|
||||||
# ASAN_OPTIONS=detect_leaks=1
|
# ASAN_OPTIONS=detect_leaks=1
|
||||||
export ASAN_OPTIONS="log_path=./test.log:abort_on_error=1"
|
export ASAN_OPTIONS="log_path=./test.log:abort_on_error=1"
|
||||||
export UBSAN_OPTIONS=print_stacktrace=1
|
export UBSAN_OPTIONS=print_stacktrace=1
|
||||||
mkdir -p build/runtime/parser
|
mkdir -p build/runtime/parser
|
||||||
# nvim looks into CMAKE_INSTALL_DIR. Hack to avoid errors
|
# nvim looks into CMAKE_INSTALL_DIR. Hack to avoid errors
|
||||||
# when running the functionaltests
|
# when running the functionaltests
|
||||||
mkdir -p outputs/out/share/nvim/syntax
|
mkdir -p outputs/out/share/nvim/syntax
|
||||||
touch outputs/out/share/nvim/syntax/syntax.vim
|
touch outputs/out/share/nvim/syntax/syntax.vim
|
||||||
|
|
||||||
# for treesitter functionaltests
|
# for treesitter functionaltests
|
||||||
mkdir -p runtime/parser
|
mkdir -p runtime/parser
|
||||||
cp -f ${pkgs.tree-sitter.builtGrammars.tree-sitter-c}/parser runtime/parser/c.so
|
cp -f ${pkgs.tree-sitter.builtGrammars.tree-sitter-c}/parser runtime/parser/c.so
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
});
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user