mason, lspconfig, lua_ls, mini.completions

This commit is contained in:
Anton Volnuhin 2023-05-09 02:07:18 +03:00
parent 710296aa31
commit 936a324282

View File

@ -27,6 +27,10 @@ require("lazy").setup({
{ "mbbill/undotree" },
{ "phaazon/hop.nvim" },
{ "echasnovski/mini.nvim", version = "*" },
{
"williamboman/mason.nvim",
build = ":MasonUpdate", -- :MasonUpdate updates registry contents
},
{
"folke/which-key.nvim",
config = function()
@ -48,6 +52,8 @@ require("lazy").setup({
})
end,
},
{ "williamboman/mason-lspconfig.nvim" },
{ "neovim/nvim-lspconfig" },
})
require("hop").setup()
@ -59,6 +65,43 @@ require("mini.statusline").setup()
require("mini.tabline").setup()
require("mini.bracketed").setup()
require("mini.surround").setup()
require("mini.completion").setup()
require("mason").setup({
ui = {
icons = {
package_installed = "",
package_pending = "",
package_uninstalled = "",
},
},
})
require("mason-lspconfig").setup({
ensure_installed = { "lua_ls", "rust_analyzer" },
})
require("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),
checkThirdParty = false,
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
},
},
})
require("osc52").setup({
max_length = 0, -- Maximum length of selection (0 for no limit)