fix(workspace-diagnostics): Not loading due to undefined filetypes

This commit is contained in:
Jiří Štefka 2024-10-05 16:14:20 +02:00
parent 6ea0b944ab
commit 3098a4c20c
Signed by: jiriks74
GPG Key ID: 1D5E30D3DB2264DE
5 changed files with 5 additions and 0 deletions

@ -16,6 +16,7 @@ vim.lsp.start {
cmd = { 'asm-lsp' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { "asm" },
on_attach = function(client, bufnr)
require("nvim-navic").attach(client, bufnr)
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)

@ -16,6 +16,7 @@ vim.lsp.start {
cmd = { 'clangd' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { "c" },
on_attach = function(client, bufnr)
require("nvim-navic").attach(client, bufnr)
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)

@ -25,6 +25,7 @@ vim.lsp.start {
cmd = { lua_ls_cmd },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { "lua" },
on_attach = function(client, bufnr)
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)
require("nvim-navic").attach(client, bufnr)

@ -15,6 +15,7 @@ vim.lsp.start {
cmd = { 'nil' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { "nix" },
on_attach = function(client, bufnr)
require("nvim-navic").attach(client, bufnr)
require("workspace-diagnostics").populate_workspace_diagnostics(client, bufnr)

@ -14,6 +14,7 @@ vim.lsp.start {
cmd = { 'bash-language-server', 'start' },
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
-- capabilities = require('user.lsp').make_client_capabilities(),
filetypes = { "sh" },
single_file_support = true,
on_attach = function(client, bufnr)
require("nvim-navic").attach(client, bufnr)