diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-07-30 13:21:57 +0530 |
---|---|---|
committer | Brahmajit Das <brahmajit.xyz@gmail.com> | 2023-07-30 13:21:57 +0530 |
commit | 13ceaab631bc38d3878d10a9f35705457ca38e34 (patch) | |
tree | 4f7185a5b0dd27c02ae15b324b99f9936b35142b /init.lua | |
parent | a51fc41ea3e10a7357df715677f45cb1bf4363f6 (diff) |
nvim: init.lua: setup clangd and lua-language-ls automatically
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -14,7 +14,6 @@ require('plugins.vimtex') require('plugins.nvim-tree') require('plugins.gitsigns') require('plugins.autopairs') - require('core.appearance') require('core.options') require('core.utils') @@ -23,3 +22,29 @@ require('core.keymaps') require('core.colorscheme') require'colorizer'.setup() + +-- Setup language servers. +local lspconfig = require('lspconfig') +lspconfig.clangd.setup{} +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'}, + }, + 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, + }, + }, + }, +} |