Compare commits

18 Commits

Author SHA1 Message Date
878c87430f nvim/lsp: fix server not beeing enabled; remove tinymist 2025-12-01 14:12:20 +01:00
0147f451a8 meta: format 2025-12-01 14:11:58 +01:00
c4084faeff nvim/lsp: switch to native LSP configuration built-in 2025-12-01 10:32:29 +01:00
6df3b346eb nvim-ts: remove verilog parser 2025-12-01 01:42:13 +01:00
779475f024 nixpkgs: 25.05 -> 25.11 2025-12-01 01:40:56 +01:00
a595413b88 add: viu, chaffa, ueberzugpp 2025-08-29 13:18:17 +02:00
e205831fd9 add nvim-web-devicons 2025-08-29 13:09:29 +02:00
34fc2804d7 flake: update 2025-08-25 18:15:01 +02:00
b23265403c update 24.11 -> 25.05; typst_lsp -> tinymst 2025-05-24 11:11:17 +02:00
8245a48cc7 add nixfmt to runtime pkgs 2025-01-10 18:03:29 +01:00
3d82bad6ee pkgs: add nixfmt-rfc-style 2025-01-08 18:32:17 +01:00
6e26ec33fa gitignore: update 2024-12-03 23:15:07 +01:00
b9c3cd2e1a gitignore: update 2024-12-03 23:14:02 +01:00
a09a34997c lsp: add typist_lsp 2024-12-03 22:33:03 +01:00
127047caeb lsp: add yaml-lsp-server 2024-12-03 22:24:57 +01:00
60acbede4d switch nixpkgs to 24.11 2024-12-03 22:09:52 +01:00
9f36693f90 lua -> vim.loop.cwd() -> vim.fn.getcwd() 2024-09-25 16:42:15 +02:00
8fdf9bd08c flake: update 2024-09-25 16:39:17 +02:00
5 changed files with 129 additions and 80 deletions

3
.gitignore vendored
View File

@@ -1 +1,4 @@
result result
.ccls-cache/
hello.c
compile_commands.json

15
flake.lock generated
View File

@@ -2,17 +2,18 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1718606988, "lastModified": 1764494334,
"narHash": "sha256-pmjP5ePc1jz+Okona3HxD7AYT0wbrCwm9bXAlj08nDM=", "narHash": "sha256-x2xCEXUlU4Ap56+t5HaoReOQ/bV/bIQ5rzTn/m+V3HQ=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "38d3352a65ac9d621b0cd3074d3bef27199ff78f", "rev": "d542db745310b6929708d9abea513f3ff19b1341",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "owner": "nixos",
"ref": "nixpkgs-unstable", "ref": "nixos-25.11",
"type": "indirect" "repo": "nixpkgs",
"type": "github"
} }
}, },
"root": { "root": {

146
flake.nix
View File

@@ -2,73 +2,89 @@
description = "A very basic flake"; description = "A very basic flake";
inputs = { inputs = {
nixpkgs.url = "nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
}; };
outputs = { outputs =
self, { self
nixpkgs, , nixpkgs
}: let ,
supportedSystems = ["x86_64-linux" "aarch64-linux"]; }:
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; let
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
in { forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
packages = forAllSystems (system: let nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; });
pkgs = nixpkgsFor.${system}; in
neovim = import ./nvim-lsp.nix {inherit pkgs;}; {
in { packages = forAllSystems (system:
nvim = pkgs.symlinkJoin { let
name = "nvim"; pkgs = nixpkgsFor.${system};
paths = with pkgs; neovim = import ./nvim-lsp.nix { inherit pkgs; };
[ in
alejandra {
ccls nvim = pkgs.symlinkJoin {
gopls name = "nvim";
luaformatter paths = with pkgs;
nixd [
pyright alejandra
rust-analyzer ccls
sumneko-lua-language-server gopls
svls luaformatter
texlab nixd
tree-sitter nixfmt-rfc-style
verible pyright
zls rust-analyzer
] lua-language-server
++ [neovim]; svls
}; texlab
}); tree-sitter
tinymist
verible
yaml-language-server
zls
viu
chafa
ueberzugpp
]
++ [ neovim ];
};
});
devShells = forAllSystems (system: let devShells = forAllSystems (system:
pkgs = nixpkgsFor.${system}; let
in { pkgs = nixpkgsFor.${system};
default = pkgs.mkShell { in
nativeBuildInputs = [ {
pkgs.alejandra default = pkgs.mkShell {
pkgs.ccls nativeBuildInputs = [
pkgs.gopls pkgs.alejandra
pkgs.luaformatter pkgs.ccls
pkgs.nixd pkgs.gopls
pkgs.pyright pkgs.luaformatter
pkgs.rust-analyzer pkgs.nixd
pkgs.sumneko-lua-language-server pkgs.nixfmt-rfc-style
pkgs.svls pkgs.pyright
pkgs.texlab pkgs.rust-analyzer
pkgs.tree-sitter pkgs.lua-language-server
pkgs.verible pkgs.svls
pkgs.zls pkgs.texlab
(import ./nvim-lsp.nix {inherit pkgs;}) pkgs.tree-sitter
]; pkgs.verible
}; pkgs.zls
}); (import ./nvim-lsp.nix { inherit pkgs; })
];
};
});
overlays = forAllSystems (system: let overlays = forAllSystems (system:
pkgs = nixpkgsFor.${system}; let
in { pkgs = nixpkgsFor.${system};
overlay = final: prev: { in
nvim = self.packages.${system}.nvim; {
}; overlay = final: prev: {
}); nvim = self.packages.${system}.nvim;
defaultPackage = forAllSystems (system: self.packages.${system}.nvim); };
}; });
defaultPackage = forAllSystems (system: self.packages.${system}.nvim);
};
} }

View File

@@ -19,7 +19,6 @@
parsers.python parsers.python
parsers.query parsers.query
parsers.rust parsers.rust
parsers.verilog
parsers.vimdoc parsers.vimdoc
parsers.zig parsers.zig
])) ]))
@@ -44,6 +43,7 @@
vim-slime vim-slime
vim-snippets vim-snippets
zig-vim zig-vim
nvim-web-devicons
]; ];
}; };
}; };

View File

@@ -34,7 +34,7 @@ require 'nvim-treesitter.configs'.setup {
enable = true, enable = true,
extended_mode = true, extended_mode = true,
max_file_lines = 1000, max_file_lines = 1000,
colors = { '#ff0000', '#0051a0' ,'#ffa500', '#ffff00', '#008000', '#8003f2' } colors = { '#ff0000', '#0051a0', '#ffa500', '#ffff00', '#008000', '#8003f2' }
} }
} }
@@ -182,15 +182,42 @@ cmp.setup({
} }
}) })
local servers = { 'pyright', 'rust_analyzer', 'ccls', 'nixd', 'texlab', 'zls', 'gopls' } local servers = { 'pyright', 'rust_analyzer', 'ccls', 'texlab', 'zls', 'gopls', 'yamlls' }
local capabilities = require('cmp_nvim_lsp').default_capabilities() local capabilities = require('cmp_nvim_lsp').default_capabilities()
for _, lsp in pairs(servers) do for _, lsp in pairs(servers) do
require('lspconfig')[lsp].setup { vim.lsp.config(lsp, {
capabilities = capabilities capabilities = capabilities
} })
vim.lsp.enable(lsp)
end end
require('lspconfig').lua_ls.setup({ vim.lsp.config('nixd', {
cmd = { "nixd" },
settings = {
nixd = {
nixpkgs = {
expr = 'import "${flake.inputs.nixpkgs}" { }',
},
formatting = {
command = { "nixpkgs-fmt" },
},
options = {
nixos = {
expr =
'(let pkgs = import "${inputs.nixpkgs}" { }; in (pkgs.lib.evalModules { modules = (import "${inputs.nixpkgs}/nixos/modules/module-list.nix") ++ [ ({...}: { nixpkgs.hostPlatform = builtins.currentSystem;} ) ] ; })).options',
},
home_manager = {
expr =
'(let pkgs = import "${inputs.nixpkgs}" { }; lib = import "${inputs.home-manager}/modules/lib/stdlib-extended.nix" pkgs.lib; in (lib.evalModules { modules = (import "${inputs.home-manager}/modules/modules.nix") { inherit lib pkgs; check = false; }; })).options',
},
},
},
},
})
vim.lsp.enable('nixd');
vim.lsp.config('lua_ls', {
capabilities = capabilities, capabilities = capabilities,
single_file_support = true, single_file_support = true,
settings = { settings = {
@@ -214,11 +241,13 @@ require('lspconfig').lua_ls.setup({
}, },
}, },
}) })
vim.lsp.enable('lua_ls');
require('lspconfig').verible.setup({ vim.lsp.config('verible', {
capabilities = capabilities, capabilities = capabilities,
root_dir = function() return vim.loop.cwd() end root_dir = function() return vim.fn.getcwd() end
}) })
vim.lsp.enable('verible');
if vim.fn.exists('+undofile') ~= 0 then if vim.fn.exists('+undofile') ~= 0 then
local undo_dir = vim.env.HOME .. '/.config/nvim/undo' local undo_dir = vim.env.HOME .. '/.config/nvim/undo'