diff options
| author | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-09-05 15:35:27 +0200 |
|---|---|---|
| committer | Ariel D'Alessandro <dalessandro.ariel@gmail.com> | 2023-09-05 15:35:27 +0200 |
| commit | 75c19f44876bc6833ecd5ccb0d715cab8d70416b (patch) | |
| tree | cb6fcec87d183fb704c9531f74d9ba9e936eea3a /lua | |
| parent | c46d110c48172b0e9ae0ac9cb9c38a5124d0236c (diff) | |
| download | nvim-conf-75c19f44876bc6833ecd5ccb0d715cab8d70416b.tar.gz nvim-conf-75c19f44876bc6833ecd5ccb0d715cab8d70416b.zip | |
updates
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/alpha/lsp/attach.lua | 2 | ||||
| -rw-r--r-- | lua/alpha/lsp/mason.lua | 12 | ||||
| -rw-r--r-- | lua/alpha/lsp/servers.lua | 8 | ||||
| -rw-r--r-- | lua/alpha/test_strategy.lua | 2 | ||||
| -rw-r--r-- | lua/plugins/duck.lua | 12 | ||||
| -rw-r--r-- | lua/plugins/laravel.lua | 22 | ||||
| -rw-r--r-- | lua/plugins/treesitter.lua | 9 |
7 files changed, 52 insertions, 15 deletions
diff --git a/lua/alpha/lsp/attach.lua b/lua/alpha/lsp/attach.lua index 84212a6..e15ad92 100644 --- a/lua/alpha/lsp/attach.lua +++ b/lua/alpha/lsp/attach.lua @@ -1,7 +1,7 @@ local telescope_mapper = require "alpha.telescope.mappings" local filetype_attach = setmetatable({ - php = function(client, bufnr) + php = function(_, bufnr) vim.api.nvim_buf_create_user_command(bufnr, "LspPhpactorReindex", function() vim.lsp.buf_notify(bufnr, "phpactor/index/reindex", {}) end, {}) diff --git a/lua/alpha/lsp/mason.lua b/lua/alpha/lsp/mason.lua index 752f6ac..a8c6ce7 100644 --- a/lua/alpha/lsp/mason.lua +++ b/lua/alpha/lsp/mason.lua @@ -12,12 +12,12 @@ for server, _ in pairs(servers) do end mason_lspconfig.setup { - ensure_installed = mason_servers, + -- ensure_installed = mason_servers, } -- filter the list for the ones not globally installed -require("mason-tool-installer").setup { - ensure_installed = vim.tbl_filter(function (tool) - return vim.fn.executable(tool) == 0 - end, require "alpha.lsp.tools"), -} +-- require("mason-tool-installer").setup { +-- ensure_installed = vim.tbl_filter(function (tool) +-- return vim.fn.executable(tool) == 0 +-- end, require "alpha.lsp.tools"), +-- } diff --git a/lua/alpha/lsp/servers.lua b/lua/alpha/lsp/servers.lua index ab70468..14ec9d3 100644 --- a/lua/alpha/lsp/servers.lua +++ b/lua/alpha/lsp/servers.lua @@ -76,7 +76,13 @@ return { }, } end, - ["marksman"] = default, + ["omnisharp"] = function() + return { + cmd = {"OmniSharp"}, + on_attach = lsp_attach, + flags = lsp_flags, + } + end, ["nil_ls"] = default, ["phpactor"] = function() return { diff --git a/lua/alpha/test_strategy.lua b/lua/alpha/test_strategy.lua index 46aae3c..9a2d34a 100644 --- a/lua/alpha/test_strategy.lua +++ b/lua/alpha/test_strategy.lua @@ -51,7 +51,7 @@ local function myStrategy(cmd) vim.notify("Test run successfully", vim.log.levels.INFO, { title = "Test" }) return end - local result = j:stderr_result() + local result = j:stderr_result() or j:stdout_result() -- join result in a single string result = table.concat(result, "\n") -- escape / characters diff --git a/lua/plugins/duck.lua b/lua/plugins/duck.lua new file mode 100644 index 0000000..a8ff8c1 --- /dev/null +++ b/lua/plugins/duck.lua @@ -0,0 +1,12 @@ +return { + "tamton-aquib/duck.nvim", + keys = { + { + "<leader>hh", + function() + require("duck").hatch("🦖", 10) + end, + { desc = "Spawn dinasours" }, + }, + }, +} diff --git a/lua/plugins/laravel.lua b/lua/plugins/laravel.lua index 72f8c3e..7defe18 100644 --- a/lua/plugins/laravel.lua +++ b/lua/plugins/laravel.lua @@ -18,18 +18,28 @@ return { desc = "Laravel Application Routes", }, }, - config = function() + init = function() vim.g.laravel_log_level = "debug" - require("laravel").setup({ + end, + config = function() + local uid = vim.system({ "id", "-u" }, { text = true }):wait().stdout or "1000" + local gid = vim.system({ "id", "-g" }, { text = true }):wait().stdout or "1000" + + local user_arg = string.format("%s:%s", vim.trim(uid), vim.trim(gid)) + + require("laravel").setup { route_info = { position = "top", }, environment = { environments = { - ["ao"] = require("laravel.environment.docker_compose").setup({container_name = "panel-webserver"}), - } - } - }) + ["ao"] = require("laravel.environment.docker_compose").setup { + container_name = "panel-webserver", + cmd = { "docker", "compose", "exec", "-u", user_arg, "-it", "panel-webserver" }, + }, + }, + }, + } require("telescope").load_extension "laravel" end, } diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 35db83a..996b881 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -53,5 +53,14 @@ return { }, }, }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = "gnn", + node_incremental = "grn", + scope_incremental = "grc", + node_decremental = "grm", + }, + }, }, } |