From b2489ca8f0481c44bf7c3bbe5ad7a717a31d633b Mon Sep 17 00:00:00 2001 From: iofq Date: Fri, 26 May 2023 06:05:44 -0500 Subject: [PATCH] idek --- config/lua/lsp-conf.lua | 12 ++++++++++-- flake.nix | 4 +++- plugins.nix | 13 +++++-------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/config/lua/lsp-conf.lua b/config/lua/lsp-conf.lua index d3661a0..e047466 100644 --- a/config/lua/lsp-conf.lua +++ b/config/lua/lsp-conf.lua @@ -1,6 +1,7 @@ -- Setup language servers. local lspconfig = require('lspconfig') lspconfig.gopls.setup {} +lspconfig.phpactor.setup {} -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions @@ -8,6 +9,11 @@ vim.keymap.set('n', 'de', vim.diagnostic.open_float) vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) vim.keymap.set('n', ']d', vim.diagnostic.goto_next) +vim.diagnostic.config({ + virtual_text = true, + underline = true, + update_in_insert = false, +}) -- Use LspAttach autocommand to only map the following keys -- after the language server attaches to the current buffer vim.api.nvim_create_autocmd('LspAttach', { @@ -26,10 +32,12 @@ vim.api.nvim_create_autocmd('LspAttach', { vim.keymap.set("n", "gd", "Telescope lsp_definitions", { buffer = bufnr }) vim.keymap.set("n", "gi", "Telescope lsp_implementations", { buffer = bufnr }) vim.keymap.set("n", "gr", "Telescope lsp_references", { buffer = bufnr }) - vim.keymap.set("n", "dt", "Telescope lsp_type_definitions", { buffer = bufnr }) - vim.keymap.set("n", "ds", "Telescope lsp_document_symbols", { buffer = bufnr }) + vim.keymap.set("n", "dt", "Telescope lsp_type_definitions", { buffer = bufnr }) + vim.keymap.set("n", "ds", "Telescope lsp_document_symbols", { buffer = bufnr }) + vim.keymap.set("n", "dS", "Telescope lsp_dynamic_workspace_symbols", { buffer = bufnr }) vim.keymap.set('n', 'df', function() vim.lsp.buf.format { async = true } end, opts) + end, }) diff --git a/flake.nix b/flake.nix index 6f9ae33..8aef94b 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,6 @@ }; dependancies = with pkgs; [ ripgrep - lazygit ]; full-dependancies = with pkgs; [ gopls @@ -85,6 +84,9 @@ apps.full = flake-utils.lib.mkApp { drv = packages.full; name = "neovim"; exePath = "/bin/nvim"; }; + apps.minimal = flake-utils.lib.mkApp { + drv = packages.minimal; name = "neovim"; exePath = "/bin/nvim"; + }; apps.default = apps.full; packages.default = packages.full; }); diff --git a/plugins.nix b/plugins.nix index b22b056..5f4e66c 100644 --- a/plugins.nix +++ b/plugins.nix @@ -7,14 +7,7 @@ mini-nvim gitsigns-nvim oil-nvim - neogit rose-pine - ]; - extra = with pkgs.vimPlugins; [ - vim-nix - - #lsp - nvim-lspconfig #treesitter (nvim-treesitter.withPlugins @@ -29,7 +22,6 @@ tree-sitter-lua tree-sitter-markdown tree-sitter-markdown-inline - tree-sitter-nix tree-sitter-php tree-sitter-python tree-sitter-yaml @@ -38,4 +30,9 @@ ) nvim-treesitter-textobjects ]; + extra = with pkgs.vimPlugins; [ + vim-nix + #lsp + nvim-lspconfig + ]; }