Migrate lsp config

This commit is contained in:
Jakob Lechner 2025-11-25 10:50:34 +01:00
parent b9e326dfe4
commit 5c0810e725

View file

@ -1,4 +1,4 @@
{ lib, nixosConfig, config, pkgs, ... }:
{ lib, nixosConfig, pkgs, ... }:
let
fakePlugin = pkgs.runCommand "neovim-fake-plugin" { } "mkdir $out";
@ -207,7 +207,6 @@ in
''
-- this configuration applies to workstations only
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
local lsp = require('lspconfig')
-- show linter messages
vim.diagnostic.config({ virtual_text = true })
@ -215,7 +214,10 @@ in
builtins.concatStringsSep "\n" (
lib.mapAttrsToList
(
lang: cfg: "lsp.${lang}.setup\n" + lib.generators.toLua { } cfg
lang: cfg: ''
vim.lsp.config('${lang}', ${lib.generators.toLua { } cfg})
vim.lsp.enable('${lang}', true)
''
)
{
# C and C++