format lua files
This commit is contained in:
parent
c792c0839b
commit
c9c630ce61
@ -45,7 +45,8 @@ return require('packer').startup(function()
|
|||||||
{ 'nvim-lua/popup.nvim' },
|
{ 'nvim-lua/popup.nvim' },
|
||||||
{ 'nvim-lua/plenary.nvim' },
|
{ 'nvim-lua/plenary.nvim' },
|
||||||
{ 'kyazdani42/nvim-web-devicons' },
|
{ 'kyazdani42/nvim-web-devicons' },
|
||||||
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' },
|
{ 'nvim-telescope/telescope-fzf-native.nvim',
|
||||||
|
run = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' },
|
||||||
},
|
},
|
||||||
config = get_setup('telescope'),
|
config = get_setup('telescope'),
|
||||||
})
|
})
|
||||||
@ -84,19 +85,19 @@ return require('packer').startup(function()
|
|||||||
use({
|
use({
|
||||||
'hrsh7th/nvim-cmp',
|
'hrsh7th/nvim-cmp',
|
||||||
requires = {
|
requires = {
|
||||||
{ 'hrsh7th/cmp-buffer'},
|
{ 'hrsh7th/cmp-buffer' },
|
||||||
{ 'hrsh7th/cmp-nvim-lsp'},
|
{ 'hrsh7th/cmp-nvim-lsp' },
|
||||||
{ 'L3MON4D3/LuaSnip'},
|
{ 'L3MON4D3/LuaSnip' },
|
||||||
{ 'saadparwaiz1/cmp_luasnip'},
|
{ 'saadparwaiz1/cmp_luasnip' },
|
||||||
{ 'hrsh7th/cmp-nvim-lua'},
|
{ 'hrsh7th/cmp-nvim-lua' },
|
||||||
{ 'octaltree/cmp-look'},
|
{ 'octaltree/cmp-look' },
|
||||||
{ 'hrsh7th/cmp-path'},
|
{ 'hrsh7th/cmp-path' },
|
||||||
{ 'hrsh7th/cmp-calc'},
|
{ 'hrsh7th/cmp-calc' },
|
||||||
{ 'f3fora/cmp-spell'},
|
{ 'f3fora/cmp-spell' },
|
||||||
{ 'hrsh7th/cmp-emoji'},
|
{ 'hrsh7th/cmp-emoji' },
|
||||||
{ 'hrsh7th/cmp-cmdline'},
|
{ 'hrsh7th/cmp-cmdline' },
|
||||||
{ 'ray-x/cmp-treesitter'},
|
{ 'ray-x/cmp-treesitter' },
|
||||||
{ 'hrsh7th/cmp-nvim-lsp-signature-help'}
|
{ 'hrsh7th/cmp-nvim-lsp-signature-help' }
|
||||||
},
|
},
|
||||||
config = get_setup('cmp'),
|
config = get_setup('cmp'),
|
||||||
})
|
})
|
||||||
@ -199,12 +200,12 @@ return require('packer').startup(function()
|
|||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
'ggandor/leap.nvim',
|
'ggandor/leap.nvim',
|
||||||
requires = {'tpope/vim-repeat'},
|
requires = { 'tpope/vim-repeat' },
|
||||||
config = get_setup('my_leap')
|
config = get_setup('my_leap')
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
'mfussenegger/nvim-dap',
|
'mfussenegger/nvim-dap',
|
||||||
requires = {'mfussenegger/nvim-dap-python'},
|
requires = { 'mfussenegger/nvim-dap-python' },
|
||||||
config = get_setup('my_dap')
|
config = get_setup('my_dap')
|
||||||
}
|
}
|
||||||
if packer_bootstrap then
|
if packer_bootstrap then
|
||||||
|
@ -101,12 +101,12 @@ local on_attach = function(client, bufnr)
|
|||||||
require("aerial").on_attach(client, bufnr)
|
require("aerial").on_attach(client, bufnr)
|
||||||
end
|
end
|
||||||
|
|
||||||
require('lspconfig')['pyright'].setup{
|
require('lspconfig')['pyright'].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
}
|
}
|
||||||
|
|
||||||
require('lspconfig')['cmake'].setup{
|
require('lspconfig')['cmake'].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
}
|
}
|
||||||
|
|
||||||
-- require('lspconfig')['clangd'].setup{
|
-- require('lspconfig')['clangd'].setup{
|
||||||
@ -120,50 +120,50 @@ require('clangd_extensions').setup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
require('lspconfig')['jsonls'].setup{
|
require('lspconfig')['jsonls'].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
}
|
}
|
||||||
|
|
||||||
local lua_rtp = vim.split(package.path, ';')
|
local lua_rtp = vim.split(package.path, ';')
|
||||||
table.insert(lua_rtp, 'lua/?.lua')
|
table.insert(lua_rtp, 'lua/?.lua')
|
||||||
table.insert(lua_rtp, 'lua/?/init.lua')
|
table.insert(lua_rtp, 'lua/?/init.lua')
|
||||||
require('lspconfig').sumneko_lua.setup{
|
require('lspconfig').sumneko_lua.setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = {
|
settings = {
|
||||||
Lua = {
|
Lua = {
|
||||||
runtime = {
|
runtime = {
|
||||||
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
|
||||||
version = 'LuaJIT',
|
version = 'LuaJIT',
|
||||||
-- Setup your lua path
|
-- Setup your lua path
|
||||||
path = lua_rtp,
|
path = lua_rtp,
|
||||||
},
|
|
||||||
diagnostics = {
|
|
||||||
-- Get the language server to recognize the `vim` global
|
|
||||||
globals = { 'vim', 'use' },
|
|
||||||
},
|
|
||||||
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,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
diagnostics = {
|
||||||
|
-- Get the language server to recognize the `vim` global
|
||||||
|
globals = { 'vim', 'use' },
|
||||||
|
},
|
||||||
|
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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
require('lspconfig')['dockerls'].setup{
|
require('lspconfig')['dockerls'].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
}
|
}
|
||||||
|
|
||||||
require('lspconfig')['yamlls'].setup{
|
require('lspconfig')['yamlls'].setup {
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
settings = {
|
settings = {
|
||||||
yaml = {
|
yaml = {
|
||||||
validate = false
|
validate = false
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
local null_ls = require('null-ls')
|
local null_ls = require('null-ls')
|
||||||
@ -181,4 +181,3 @@ null_ls.setup({
|
|||||||
})
|
})
|
||||||
|
|
||||||
vim.diagnostic.config({ virtual_text = false })
|
vim.diagnostic.config({ virtual_text = false })
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user