Add vscode LSP support
This commit is contained in:
parent
d5ea2832d5
commit
5686c97114
3 changed files with 25 additions and 4 deletions
15
.vscode/c_cpp_properties.json
vendored
Normal file
15
.vscode/c_cpp_properties.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Linux",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/**",
|
||||||
|
"${env:C_INCLUDE_PATH}"
|
||||||
|
],
|
||||||
|
"defines": [],
|
||||||
|
"cStandard": "c11",
|
||||||
|
"intelliSenseMode": "linux-gcc-x64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"*.h": "c"
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,16 +14,17 @@
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
|
||||||
linux_dev = pkgs.linuxKernel.kernels.linux_zen.dev;
|
linux = pkgs.linuxKernel.kernels.linux_zen;
|
||||||
in {
|
in {
|
||||||
devShells = {
|
devShells = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = [ linux_dev ];
|
packages = [ linux.moduleBuildDependencies ];
|
||||||
|
|
||||||
LINUX_MODULES_FOLDER = "${linux_dev}/lib/modules/${linux_dev.modDirVersion}";
|
LINUX_MODULES_FOLDER = "${linux.dev}/lib/modules/${linux.modDirVersion}";
|
||||||
|
C_INCLUDE_PATH = "${linux.dev}/lib/modules/${linux.modDirVersion}/source/include";
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
echo "Current Linux Kernel used : ${linux_dev.version}"
|
echo "Current Linux Kernel used : ${linux.version}"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue