From 659be8fd810bebac219f031e6612ba9a9910ce31 Mon Sep 17 00:00:00 2001 From: osbm Date: Fri, 7 Mar 2025 16:32:50 +0300 Subject: [PATCH] make lsp folder --- plugins/default.nix | 59 +++++------------------------------------ plugins/lsp/default.nix | 12 +++++++++ plugins/lsp/nix.nix | 12 +++++++++ 3 files changed, 30 insertions(+), 53 deletions(-) create mode 100644 plugins/lsp/default.nix create mode 100644 plugins/lsp/nix.nix diff --git a/plugins/default.nix b/plugins/default.nix index 3cc758c..c69b086 100644 --- a/plugins/default.nix +++ b/plugins/default.nix @@ -1,7 +1,8 @@ -{ self, lib, pkgs, ... }: - { - imports = [ ./mini.nix ]; + imports = [ + ./mini.nix + ./lsp + ]; plugins = { treesitter = { @@ -10,55 +11,7 @@ }; todo-comments.enable = true; - - lsp = { - servers = { - nixd = { - enable = true; - settings = let flake = ''(builtins.getFlake "${self}")''; - in { - nixpkgs.expr = "import ${flake}.inputs.nixpkgs { }"; - formatting = { - command = [ "${lib.getExe pkgs.nixfmt-rfc-style}" ]; - }; - }; - }; - typos_lsp = { - enable = true; - extraOptions = { init_options = { diagnosticSeverity = "Hint"; }; }; - }; - pylsp = { - enable = true; - settings = { - configurationSources = [ "flake8" ]; - plugins = { - pycodestyle = { - enabled = true; - maxLineLength = 120; - }; - flake8 = { - enabled = true; - maxLineLength = 120; - }; - }; - }; - - }; - astro = { enable = true; }; - arduino_language_server = { enable = true; }; - bashls = { enable = true; }; - clangd = { enable = true; }; - dartls = { enable = true; }; - lua_ls = { enable = true; }; - mdx_analyzer = { enable = true; }; - fish_lsp = { enable = true; }; - docker_compose_language_service = { enable = true; }; - dockerls = { enable = true; }; - marksman = { enable = true; }; - }; - }; - - lualine = { enable = true; }; + lualine.enable = true; cmp = { # TODO read what this does @@ -70,7 +23,7 @@ oil.enable = true; # shell scripting #telescope - telescope = { enable = true; }; + telescope.enable = true; web-devicons.enable = true; # be concious of this choice }; } diff --git a/plugins/lsp/default.nix b/plugins/lsp/default.nix new file mode 100644 index 0000000..fbdc4aa --- /dev/null +++ b/plugins/lsp/default.nix @@ -0,0 +1,12 @@ +{ + imports = [ + ./nix.nix + ]; + plugins.lsp.servers = { + typos_lsp = { + enable = true; + extraOptions.init_options.diagnosticSeverity = "Hint"; + }; + astro.enable = true; + }; +} diff --git a/plugins/lsp/nix.nix b/plugins/lsp/nix.nix new file mode 100644 index 0000000..d78bea3 --- /dev/null +++ b/plugins/lsp/nix.nix @@ -0,0 +1,12 @@ +{lib, pkgs, self, ...}: { + plugins.lsp.servers.nixd = { + enable = true; + settings = let flake = ''(builtins.getFlake "${self}")''; + in { + nixpkgs.expr = "import ${flake}.inputs.nixpkgs { }"; + formatting = { + command = [ "${lib.getExe pkgs.nixfmt-rfc-style}" ]; + }; + }; + }; +} \ No newline at end of file