From d674cbc2ec5b3c5709918d6bc09e4aa590702ca5 Mon Sep 17 00:00:00 2001 From: vorboyvo Date: Mon, 29 Jan 2024 13:43:19 -0500 Subject: [PATCH] Added support for LSPs to nvim Added shutdown menu --- programs/neovim/init.lua | 11 +++++++++++ scripts/dmenu.sh | 1 + scripts/shutdownmenu.sh | 16 ++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 scripts/dmenu.sh create mode 100644 scripts/shutdownmenu.sh diff --git a/programs/neovim/init.lua b/programs/neovim/init.lua index 3d7a331..92c702e 100644 --- a/programs/neovim/init.lua +++ b/programs/neovim/init.lua @@ -27,6 +27,17 @@ plugins = { "folke/which-key.nvim", { "folke/neoconf.nvim", cmd = "Neoconf" }, "folke/neodev.nvim", + { + "neovim/nvim-lspconfig", + ["dependencies"] = { + { "j-hui/fidget.nvim", ["opts"] = {} }, + { "folke/neodev.nvim", ["opts"] = {} } + }, + ["name"] = "nvim-lspconfig" + }, } require("lazy").setup(plugins) + +-- Configure nvim-lspconfig to work with servers +require'lspconfig'.ocamllsp.setup{} diff --git a/scripts/dmenu.sh b/scripts/dmenu.sh new file mode 100644 index 0000000..2d13550 --- /dev/null +++ b/scripts/dmenu.sh @@ -0,0 +1 @@ +bemenu -i --fn Red Hat Display 12 -H 24 -p \"\" -B 2 --hp 5' diff --git a/scripts/shutdownmenu.sh b/scripts/shutdownmenu.sh new file mode 100644 index 0000000..e722265 --- /dev/null +++ b/scripts/shutdownmenu.sh @@ -0,0 +1,16 @@ +case `printf "Cancel\nSuspend\nPower Off\nReboot\nLog Out" | sh dmenu.sh` in + "Cancel") + : + ;; + "Suspend") + systemctl suspend + ;; + "Power Off") + systemctl poweroff + ;; + "Reboot") + systemctl reboot + ;; + "Log Out") + loginctl kill-session + ;;