OpenBSD related updates
This commit is contained in:
parent
e6a0fc287b
commit
e5fb41aaf8
|
@ -24,13 +24,12 @@ then
|
|||
'texlab',
|
||||
'zls'
|
||||
})
|
||||
elseif (MY_OS == 'FreeBSD')
|
||||
elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD')
|
||||
then
|
||||
lsp.ensure_installed({
|
||||
-- Replace these with whatever servers you want to install
|
||||
'bashls',
|
||||
'dockerls',
|
||||
'julials',
|
||||
'pylsp',
|
||||
})
|
||||
else
|
||||
|
@ -68,84 +67,132 @@ lsp.on_attach(function(client, bufnr)
|
|||
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts, { desc = "LSP Signature Help" })
|
||||
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({
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { 'vim' },
|
||||
neededFileStatus = {
|
||||
["codestyle-check"] = "Any",
|
||||
--require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls())
|
||||
require('lspconfig').lua_ls.setup({
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = { 'vim' },
|
||||
neededFileStatus = {
|
||||
["codestyle-check"] = "Any",
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
-- Put format options here
|
||||
-- NOTE: the value should be STRING!!
|
||||
defaultConfig = {
|
||||
indent_style = "space",
|
||||
indent_size = "4",
|
||||
}
|
||||
},
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
library = vim.api.nvim_get_runtime_file("", true),
|
||||
},
|
||||
-- Do not send telemetry data containing a randomized but unique identifier
|
||||
telemetry = {
|
||||
enable = false,
|
||||
},
|
||||
format = {
|
||||
enable = true,
|
||||
-- Put format options here
|
||||
-- NOTE: the value should be STRING!!
|
||||
defaultConfig = {
|
||||
indent_style = "space",
|
||||
indent_size = "4",
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
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,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt"
|
||||
local 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.
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
--})
|
||||
|
||||
for word in io.open(path, "r"):lines() do
|
||||
table.insert(words, word)
|
||||
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').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({})
|
||||
|
||||
require('lspconfig').zls.setup({})
|
||||
|
||||
|
||||
lsp.setup()
|
||||
|
|
Loading…
Reference in New Issue