From 5b1d9931181b9b59707eb2d860eb870e78d9dd74 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 30 Oct 2023 17:58:33 -0500 Subject: [PATCH] implement host-specific plugins --- .../nvim/lua/plugins/builtins.lua | 4 +- .../nvim/lua/plugins/host.lua | 39 +++++++++++++++++++ .../nvim/lua/plugins/languages.lua | 2 - .../nvim/lua/plugins/lsp.lua | 2 +- .../nvim/lua/plugins/ui.lua | 6 +-- 5 files changed, 44 insertions(+), 9 deletions(-) create mode 100644 home/private_dot_config/nvim/lua/plugins/host.lua diff --git a/home/private_dot_config/nvim/lua/plugins/builtins.lua b/home/private_dot_config/nvim/lua/plugins/builtins.lua index dd4d1b4..6943160 100644 --- a/home/private_dot_config/nvim/lua/plugins/builtins.lua +++ b/home/private_dot_config/nvim/lua/plugins/builtins.lua @@ -64,8 +64,6 @@ return { "json", "latex", "lua", - "luadoc", - "luap", "markdown", "markdown_inline", "nix", @@ -78,7 +76,7 @@ return { "vimdoc", "yaml", "yuck", - "zig" + "zig", }, }, }, diff --git a/home/private_dot_config/nvim/lua/plugins/host.lua b/home/private_dot_config/nvim/lua/plugins/host.lua new file mode 100644 index 0000000..b29bfeb --- /dev/null +++ b/home/private_dot_config/nvim/lua/plugins/host.lua @@ -0,0 +1,39 @@ +local hostname = vim.fn.hostname() +local plugins = {} + +local single_host_plugins = { + othalan = { + -- https://github.com/nvim-treesitter/nvim-treesitter/pull/5437 + -- { "aMOPel/nvim-treesitter-nim" } + { "kaarmu/typst.vim" }, + { + "mickael-menu/zk-nvim", + config = function() + require("zk").setup({ + -- See Setup section below + }) + end, + }, + { "Fymyte/rasi.vim" }, + { dir = "~/dev/github/usu-dev/usu-vim/" }, + }, + algiz = { + { "LnL7/vim-nix" }, + }, +} + +local function add_single_host_plugins() + if vim.list_contains(vim.tbl_keys(single_host_plugins), hostname) then + vim.list_extend(plugins, single_host_plugins[hostname]) + end +end + +if vim.list_contains({ "othalan", "algiz" }, hostname) then + vim.list_extend(plugins, { + { "lambdalisue/suda.vim" }, + }) +end + +add_single_host_plugins() + +return plugins diff --git a/home/private_dot_config/nvim/lua/plugins/languages.lua b/home/private_dot_config/nvim/lua/plugins/languages.lua index e48e7a4..5e10037 100644 --- a/home/private_dot_config/nvim/lua/plugins/languages.lua +++ b/home/private_dot_config/nvim/lua/plugins/languages.lua @@ -1,6 +1,4 @@ return { - { "LnL7/vim-nix" }, { "alaviss/nim.nvim" }, { "raivivek/vim-snakemake" }, - { "Fymyte/rasi.vim" }, } diff --git a/home/private_dot_config/nvim/lua/plugins/lsp.lua b/home/private_dot_config/nvim/lua/plugins/lsp.lua index 6c81934..ef66e7e 100644 --- a/home/private_dot_config/nvim/lua/plugins/lsp.lua +++ b/home/private_dot_config/nvim/lua/plugins/lsp.lua @@ -1,7 +1,7 @@ return { "neovim/nvim-lspconfig", opts = { - autoformat = false, + -- autoformat = false, servers = { pylsp = { settings = { diff --git a/home/private_dot_config/nvim/lua/plugins/ui.lua b/home/private_dot_config/nvim/lua/plugins/ui.lua index 0e42f21..b645abc 100644 --- a/home/private_dot_config/nvim/lua/plugins/ui.lua +++ b/home/private_dot_config/nvim/lua/plugins/ui.lua @@ -1,7 +1,7 @@ return { { "nvimdev/dashboard-nvim", - opts = function (_, opts) + opts = function(_, opts) local logo = [[ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⡤⠴⠶⠶⠶⠶⠦⢤⣤⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⠶⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠛⠶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀ @@ -34,9 +34,9 @@ return { -- return colors[math.random(#colors)] -- end -- - opts.config.header = vim.split(logo,"\n") + opts.config.header = vim.split(logo, "\n") return opts - end + end, }, { "folke/edgy.nvim",