From 45db206f9b905b2cc7145bc20f061f9a99804b16 Mon Sep 17 00:00:00 2001 From: sloane <1699281+sloanelybutsurely@users.noreply.github.com> Date: Thu, 18 Jul 2024 12:06:42 -0400 Subject: [PATCH] install elixir-tools.nvim --- .config/nvim/lazy-lock.json | 5 +++-- .config/nvim/lua/plugins/elixir.lua | 31 +++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/lua/plugins/elixir.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 56d6e4d..1fdcacb 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,11 +1,12 @@ { + "elixir-tools.nvim": { "branch": "main", "commit": "5e7596be469be0800e9cbe3415de971f7286c3d0" }, "lazy.nvim": { "branch": "main", "commit": "c92c6b5fd2b3a13c8999ab8379e43a79c9406e59" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mini.icons": { "branch": "main", "commit": "c291191e2a2a99f8aeea5e4d6406af54d11c9608" }, "nerdtree": { "branch": "master", "commit": "fbb71fcd90602e3ec77f40b864b5f9b437c496c5" }, "nvim-lspconfig": { "branch": "master", "commit": "df9c116cbcf0aa7e58f2b36b0296fa687e87f36f" }, - "nvim-treesitter": { "branch": "master", "commit": "874b99065b4b00b84b0ca5fa63490c93728a45ab" }, + "nvim-treesitter": { "branch": "master", "commit": "d78ab90f8e40d91bab98f58582d6dd5119e6088f" }, "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, @@ -17,5 +18,5 @@ "vim-sensible": { "branch": "master", "commit": "0ce2d843d6f588bb0c8c7eec6449171615dc56d9" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, - "which-key.nvim": { "branch": "main", "commit": "72aba5565ea1a03b1d4df5ede793dae29d874ea0" } + "which-key.nvim": { "branch": "main", "commit": "c512d135531be81e17c85e254994cc755d3016c5" } } diff --git a/.config/nvim/lua/plugins/elixir.lua b/.config/nvim/lua/plugins/elixir.lua new file mode 100644 index 0000000..94978cf --- /dev/null +++ b/.config/nvim/lua/plugins/elixir.lua @@ -0,0 +1,31 @@ +return { + 'elixir-tools/elixir-tools.nvim', + version = '*', + event = { 'BufReadPre', 'BufNewFile' }, + config = function() + local elixir = require('elixir') + local elixirls = require('elixir.elixirls') + + elixir.setup { + nextls = {enable = true}, + elixirls = { + enable = true, + settings = elixirls.settings { + dialyzerEnabled = false, + enableTestLenses = false, + }, + on_attach = function(client, bufnr) + vim.keymap.set('n', 'fp', ':ElixirFromPipe', { buffer = true, noremap = true }) + vim.keymap.set('n', 'tp', ':ElixirToPipe', { buffer = true, noremap = true }) + vim.keymap.set('v', 'em', ':ElixirExpandMacro', { buffer = true, noremap = true }) + end, + }, + projectionist = { + enable = true + } + } + end, + dependencies = { + 'nvim-lua/plenary.nvim', + }, +}