mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
nixvimConfigs/fiesta/setups/lsp: init
This commit is contained in:
parent
d800232d18
commit
7ee0e6321a
@ -9,6 +9,7 @@
|
||||
ui.enable = true;
|
||||
completion.enable = true;
|
||||
treesitter.enable = true;
|
||||
lsp.enable = true;
|
||||
fuzzy-finder.enable = true;
|
||||
debugging.enable = true;
|
||||
desktop-utils.enable = true;
|
||||
|
@ -4,6 +4,7 @@
|
||||
./setups/debugging.nix
|
||||
./setups/desktop-utils.nix
|
||||
./setups/fuzzy-finder.nix
|
||||
./setups/lsp.nix
|
||||
./setups/note-taking.nix
|
||||
./setups/snippets
|
||||
./setups/treesitter.nix
|
||||
|
41
configs/nixvim/fiesta/modules/setups/lsp.nix
Normal file
41
configs/nixvim/fiesta/modules/setups/lsp.nix
Normal file
@ -0,0 +1,41 @@
|
||||
{ config, lib, ... }:
|
||||
|
||||
let
|
||||
nixvimConfig = config.nixvimConfigs.fiesta;
|
||||
cfg = nixvimConfig.setups.lsp;
|
||||
in
|
||||
{
|
||||
options.nixvimConfigs.fiesta.setups.lsp.enable =
|
||||
lib.mkEnableOption null // {
|
||||
description = ''
|
||||
Whether to enable LSP setup. Take note you'll have to enable and
|
||||
configure individual language servers yourself since the resulting
|
||||
NixVim config can be pretty heavy.
|
||||
'';
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins.lsp.enable = true;
|
||||
|
||||
# Keymaps for moving around in the buffer.
|
||||
plugins.keymaps.lspBuf = {
|
||||
K = "hover";
|
||||
gD = "references";
|
||||
gd = "definition";
|
||||
gi = "implementation";
|
||||
gt = "type_definition";
|
||||
};
|
||||
|
||||
# Keymaps for moving around with the doctor.
|
||||
plugins.keymaps.diagnostic = {
|
||||
"<leader>j" = "goto_next";
|
||||
"<leader>k" = "goto_prev";
|
||||
};
|
||||
|
||||
# Enable lsp-format
|
||||
plugins.lsp-format.enable = true;
|
||||
|
||||
# Make those diagnostics fit the screen, GODDAMNIT!
|
||||
plugins.lsp-lines.enable = true;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user