From 7f6817c852930f6e23eecf1ce92d1ab6a17284c9 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Thu, 1 Jun 2023 00:59:08 +0200 Subject: [PATCH] try to fix neodev --- lua/config/lazy.lua | 14 +++++++------- lua/plugins/lspconfig.lua | 23 ++++++----------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua index 0d36981..cee64af 100644 --- a/lua/config/lazy.lua +++ b/lua/config/lazy.lua @@ -1,14 +1,14 @@ -local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({ - 'git', - 'clone', - '--filter=blob:none', - '--single-branch', - 'https://github.com/folke/lazy.nvim.git', + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release lazypath, }) end -vim.opt.runtimepath:prepend(lazypath) +vim.opt.rtp:prepend(lazypath) require('lazy').setup('plugins', {}) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 6e7614e..862bd27 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -8,10 +8,11 @@ return { 'ray-x/lsp_signature.nvim', { 'folke/neodev.nvim', - config = true, }, }, config = function() + require('neodev').setup({ + }) require('mason').setup({ ui = { border = 'rounded' @@ -20,7 +21,7 @@ return { require('mason-lspconfig').setup({ automatic_installation = false, }) - local lspconfig = require 'lspconfig' + local lspconfig = require('lspconfig') local capabilities = require('cmp_nvim_lsp').default_capabilities() @@ -245,29 +246,17 @@ return { on_attach = on_attach, } - local lua_rtp = vim.split(package.path, ';') - table.insert(lua_rtp, 'lua/?.lua') - table.insert(lua_rtp, 'lua/?/init.lua') lspconfig.lua_ls.setup { capabilities = capabilities, on_attach = on_attach, settings = { Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = 'LuaJIT', - -- Setup your lua path - path = lua_rtp, - }, - 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, }, + completion = { + callSnippet = 'Replace' + }, -- Do not send telemetry data containing a randomized but unique identifier telemetry = { enable = false,