summaryrefslogtreecommitdiff
path: root/nvim/lua/config/lsp.lua
diff options
context:
space:
mode:
Diffstat (limited to 'nvim/lua/config/lsp.lua')
-rw-r--r--nvim/lua/config/lsp.lua78
1 files changed, 39 insertions, 39 deletions
diff --git a/nvim/lua/config/lsp.lua b/nvim/lua/config/lsp.lua
index 82a64fb..1927dba 100644
--- a/nvim/lua/config/lsp.lua
+++ b/nvim/lua/config/lsp.lua
@@ -1,70 +1,70 @@
-- LSP diagnostic info config (erorrs, warnings, etc.)
vim.diagnostic.config({
-- use virtual text to show diagnostic messages
- virtual_text = true,
+ virtual_text = true,
})
-- requires vscode-json-languageserver
-vim.lsp.enable('jsonls')
-vim.lsp.config('jsonls', {
+vim.lsp.enable("jsonls")
+vim.lsp.config("jsonls", {
settings = {
json = {
- schemas = require('schemastore').json.schemas {
+ schemas = require("schemastore").json.schemas({
select = {
- 'tsconfig.json',
- 'package.json',
- 'prettierrc.json',
- '.eslintrc',
- }
- },
+ "tsconfig.json",
+ "package.json",
+ "prettierrc.json",
+ ".eslintrc",
+ },
+ }),
validate = { enable = true },
},
},
})
-vim.api.nvim_create_autocmd({"BufRead", "BufNewFile"}, {
- pattern = { "api-extractor.json" },
- callback = function()
- vim.bo.filetype = "jsonc"
- end,
+vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
+ pattern = { "api-extractor.json" },
+ callback = function()
+ vim.bo.filetype = "jsonc"
+ end,
})
-- requires bash-language-server, shellcheck is a nice optional addition
-vim.lsp.enable('bashls')
+vim.lsp.enable("bashls")
-- dymanic path to bitbucket config schema
local bb_schema_path = vim.fn.stdpath("config") .. "/bitbucket-pipelines.json"
-- requires yaml-language-server
-vim.lsp.enable('yamlls')
-vim.lsp.config('yamlls', {
+vim.lsp.enable("yamlls")
+vim.lsp.config("yamlls", {
settings = {
yaml = {
- schemas = require('schemastore').yaml.schemas {
+ schemas = require("schemastore").yaml.schemas({
-- I can stop using that until this schema stops using $ref in root:
-- https://api.bitbucket.org/schemas/pipelines-configuration
replace = {
- ['bitbucket-pipelines'] = {
- description = 'Patched pipelines schema',
- name = 'bitbucket-pipelines',
- fileMatch = 'bitbucket-pipelines.yml',
- url = 'file://' .. bb_schema_path,
- }
- }
- },
- }
- }
+ ["bitbucket-pipelines"] = {
+ description = "Patched pipelines schema",
+ name = "bitbucket-pipelines",
+ fileMatch = "bitbucket-pipelines.yml",
+ url = "file://" .. bb_schema_path,
+ },
+ },
+ }),
+ },
+ },
})
-- requires clang installed
-vim.lsp.enable('clangd')
-vim.lsp.enable('eslint')
-vim.lsp.enable('cssls')
+vim.lsp.enable("clangd")
+vim.lsp.enable("eslint")
+vim.lsp.enable("cssls")
-- requires typescript-language-server
-vim.lsp.enable('ts_ls')
+vim.lsp.enable("ts_ls")
-- requires jdtls (AUR) and mfussenegger/nvim-jdtls plugin
-vim.lsp.enable('jdtls')
-vim.lsp.config('jdtls', {
+vim.lsp.enable("jdtls")
+vim.lsp.config("jdtls", {
settings = {
java = {
configuration = {
@@ -74,8 +74,8 @@ vim.lsp.config('jdtls', {
name = "JavaSE-17",
path = "/usr/lib/jvm/java-17-temurin/",
},
- }
- }
- }
- }
+ },
+ },
+ },
+ },
})