From f098da32295c4970feb23aab5b1b06874992d18e Mon Sep 17 00:00:00 2001 From: Shahab Dogar Date: Sun, 2 Feb 2025 22:15:10 +0500 Subject: [PATCH] fix: cleanup nvim config and add lua-lsp to flake devshell --- flake.nix | 1 + .../nvim/lua/custom/configs/lspconfig.lua | 20 ---------- .../dotfiles/nvim/lua/custom/plugins.lua | 37 ------------------- 3 files changed, 1 insertion(+), 57 deletions(-) diff --git a/flake.nix b/flake.nix index ea78024..d3da482 100644 --- a/flake.nix +++ b/flake.nix @@ -85,6 +85,7 @@ devShell.x86_64-linux = pkgs.mkShell { buildInputs = with pkgs; [ nil + lua-language-server ]; }; }; diff --git a/home-manager/dotfiles/nvim/lua/custom/configs/lspconfig.lua b/home-manager/dotfiles/nvim/lua/custom/configs/lspconfig.lua index 5abc110..33f7eb2 100644 --- a/home-manager/dotfiles/nvim/lua/custom/configs/lspconfig.lua +++ b/home-manager/dotfiles/nvim/lua/custom/configs/lspconfig.lua @@ -61,23 +61,3 @@ lspconfig.pyright.setup { } lspconfig.gleam.setup({}) - -lspconfig.phpactor.setup { - root_dir = function(_) - return vim.loop.cwd() - end, - init_options = { - ["language_server.diagnostics_on_update"] = false, - ["language_server.diagnostics_on_open"] = false, - ["language_server.diagnostics_on_save"] = false, - ["language_server_phpstan.enabled"] = false, - ["language_server_psalm.enabled"] = false, - } -} - -lspconfig.ruby_lsp.setup({ - init_options = { - formatter = 'standard', - linters = { 'standard' }, - }, -}) diff --git a/home-manager/dotfiles/nvim/lua/custom/plugins.lua b/home-manager/dotfiles/nvim/lua/custom/plugins.lua index 0ea22f0..b098b26 100644 --- a/home-manager/dotfiles/nvim/lua/custom/plugins.lua +++ b/home-manager/dotfiles/nvim/lua/custom/plugins.lua @@ -271,43 +271,6 @@ local plugins = { }) end, }, - { - -- Add a Treesitter parser for Laravel Blade to provide Blade syntax highlighting. - "nvim-treesitter/nvim-treesitter", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "blade", - "php_only", - }) - end, - config = function(_, opts) - vim.filetype.add({ - pattern = { - [".*%.blade%.php"] = "blade", - }, - }) - - require("nvim-treesitter.configs").setup(opts) - local parser_config = require("nvim-treesitter.parsers").get_parser_configs() - parser_config.blade = { - install_info = { - url = "https://github.com/EmranMR/tree-sitter-blade", - files = { "src/parser.c" }, - branch = "main", - }, - filetype = "blade", - } - end, - }, - { - -- Add the blade-nav.nvim plugin which provides Goto File capabilities - -- for Blade files. - "ricardoramirezr/blade-nav.nvim", - dependencies = { - "hrsh7th/nvim-cmp", - }, - ft = { "blade", "php" }, - }, } return plugins