try to fix neodev
This commit is contained in:
parent
3c7148431f
commit
7f6817c852
@ -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
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
'git',
|
"git",
|
||||||
'clone',
|
"clone",
|
||||||
'--filter=blob:none',
|
"--filter=blob:none",
|
||||||
'--single-branch',
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
'https://github.com/folke/lazy.nvim.git',
|
"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.runtimepath:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
require('lazy').setup('plugins', {})
|
require('lazy').setup('plugins', {})
|
||||||
|
@ -8,10 +8,11 @@ return {
|
|||||||
'ray-x/lsp_signature.nvim',
|
'ray-x/lsp_signature.nvim',
|
||||||
{
|
{
|
||||||
'folke/neodev.nvim',
|
'folke/neodev.nvim',
|
||||||
config = true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
|
require('neodev').setup({
|
||||||
|
})
|
||||||
require('mason').setup({
|
require('mason').setup({
|
||||||
ui = {
|
ui = {
|
||||||
border = 'rounded'
|
border = 'rounded'
|
||||||
@ -20,7 +21,7 @@ return {
|
|||||||
require('mason-lspconfig').setup({
|
require('mason-lspconfig').setup({
|
||||||
automatic_installation = false,
|
automatic_installation = false,
|
||||||
})
|
})
|
||||||
local lspconfig = require 'lspconfig'
|
local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||||
|
|
||||||
@ -245,29 +246,17 @@ return {
|
|||||||
on_attach = on_attach,
|
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 {
|
lspconfig.lua_ls.setup {
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
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 = {
|
workspace = {
|
||||||
-- Make the server aware of Neovim runtime files
|
|
||||||
library = vim.api.nvim_get_runtime_file('', true),
|
|
||||||
checkThirdParty = false,
|
checkThirdParty = false,
|
||||||
},
|
},
|
||||||
|
completion = {
|
||||||
|
callSnippet = 'Replace'
|
||||||
|
},
|
||||||
-- Do not send telemetry data containing a randomized but unique identifier
|
-- Do not send telemetry data containing a randomized but unique identifier
|
||||||
telemetry = {
|
telemetry = {
|
||||||
enable = false,
|
enable = false,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user