mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:34:45 +01:00
@@ -0,0 +1,28 @@
|
||||
-- Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
||||
-- Exceptions. See /LICENSE for license information.
|
||||
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
carbon = 'carbon',
|
||||
},
|
||||
})
|
||||
|
||||
vim.treesitter.language.add("carbon")
|
||||
|
||||
-- LSP
|
||||
local lsp = require 'lspconfig'
|
||||
local configs = require 'lspconfig.configs'
|
||||
local util = require 'lspconfig.util'
|
||||
|
||||
-- Check if the config is already defined (useful when reloading this file)
|
||||
if not configs.carbon then
|
||||
configs.carbon = {
|
||||
default_config = {
|
||||
cmd = { "./bazel-bin/language_server/language_server" },
|
||||
filetypes = { "carbon" },
|
||||
root_dir = util.find_git_ancestor,
|
||||
}
|
||||
}
|
||||
end
|
||||
lsp.carbon.setup {}
|
||||
Reference in New Issue
Block a user