OpenBSD related updates

This commit is contained in:
Administrator 2024-03-07 11:47:16 +00:00
parent e6a0fc287b
commit e5fb41aaf8
1 changed files with 114 additions and 67 deletions

View File

@ -24,13 +24,12 @@ then
'texlab', 'texlab',
'zls' 'zls'
}) })
elseif (MY_OS == 'FreeBSD') elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then then
lsp.ensure_installed({ lsp.ensure_installed({
-- Replace these with whatever servers you want to install -- Replace these with whatever servers you want to install
'bashls', 'bashls',
'dockerls', 'dockerls',
'julials',
'pylsp', 'pylsp',
}) })
else else
@ -68,17 +67,21 @@ lsp.on_attach(function(client, bufnr)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts, { desc = "LSP Signature Help" }) vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts, { desc = "LSP Signature Help" })
end) end)
require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({}) if (MY_OS == 'Linux')
then
-- Installed for Linux
require('lspconfig').bashls.setup({})
--require('lspconfig').gopls.setup({}) require('lspconfig').clangd.setup({})
require('lspconfig').julials.setup({}) --require('lspconfig').gopls.setup({})
require('lspconfig').julials.setup({})
--require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) --require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
require('lspconfig').lua_ls.setup({ require('lspconfig').lua_ls.setup({
settings = { settings = {
Lua = { Lua = {
runtime = { runtime = {
@ -111,16 +114,16 @@ require('lspconfig').lua_ls.setup({
}, },
}, },
}, },
}) })
local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt" local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
local words = {} local words = {}
for word in io.open(path, "r"):lines() do for word in io.open(path, "r"):lines() do
table.insert(words, word) table.insert(words, word)
end end
require('lspconfig').ltex.setup({ require('lspconfig').ltex.setup({
settings = { settings = {
ltex = { ltex = {
language = "en-GB", language = "en-GB",
@ -129,23 +132,67 @@ require('lspconfig').ltex.setup({
}, },
}, },
}, },
}) })
-- source: https://rust-analyzer.github.io/manual.html#nvim-lsp -- source: https://rust-analyzer.github.io/manual.html#nvim-lsp
--require('lspconfig').rust_analyzer.setup({ --require('lspconfig').rust_analyzer.setup({
-- on_attach = on_attach, -- on_attach = on_attach,
-- settings = { -- settings = {
-- ["rust-analyzer"] = { -- ["rust-analyzer"] = {
-- inlayHints = { -- inlayHints = {
-- closingBraceHints = true, -- Whether to show inlay hints after a closing } to indicate what item it belongs to. -- closingBraceHints = true, -- Whether to show inlay hints after a closing } to indicate what item it belongs to.
-- } -- }
-- } -- }
-- } -- }
--}) --})
require('lspconfig').texlab.setup({}) require('lspconfig').texlab.setup({})
require('lspconfig').zls.setup({})
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
then
-- Installed for BSD
require('lspconfig').bashls.setup({})
require('lspconfig').clangd.setup({})
--local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
--local words = {}
--for word in io.open(path, "r"):lines() do
-- table.insert(words, word)
--end
--require('lspconfig').ltex.setup({
-- settings = {
-- ltex = {
-- language = "en-GB",
-- dictionary = {
-- ["en-GB"] = words,
-- },
-- },
-- },
--})
-- source: https://rust-analyzer.github.io/manual.html#nvim-lsp
--require('lspconfig').rust_analyzer.setup({
-- on_attach = on_attach,
-- settings = {
-- ["rust-analyzer"] = {
-- inlayHints = {
-- closingBraceHints = true, -- Whether to show inlay hints after a closing } to indicate what item it belongs to.
-- }
-- }
-- }
--})
-- require('lspconfig').texlab.setup({})
else
print('Should never be here')
end
require('lspconfig').zls.setup({})
lsp.setup() lsp.setup()