-- LSP diagnostic info config (erorrs, warnings, etc.) vim.diagnostic.config({ -- use virtual text to show diagnostic messages virtual_text = true, }) -- requires vscode-json-languageserver vim.lsp.enable('jsonls') vim.lsp.config('jsonls', { settings = { json = { schemas = require('schemastore').json.schemas { select = { '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, }) -- requires bash-language-server, shellcheck is a nice optional addition 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', { settings = { yaml = { 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, } } }, } } }) -- requires clang installed vim.lsp.enable('clangd') vim.lsp.enable('eslint') vim.lsp.enable('cssls') -- requires typescript-language-server vim.lsp.enable('ts_ls') -- requires jdtls (AUR) and mfussenegger/nvim-jdtls plugin vim.lsp.enable('jdtls') vim.lsp.config('jdtls', { settings = { java = { configuration = { runtimes = { -- java 17 for Minecraft modding { name = "JavaSE-17", path = "/usr/lib/jvm/java-17-temurin/", }, } } } } })