From c9c630ce61821248c960c961d43679c55c95b81a Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Sun, 31 Jul 2022 14:18:55 +0200 Subject: [PATCH] format lua files --- lua/my_plugins.lua | 33 +++++++++-------- lua/setup/my_lspconfig.lua | 75 +++++++++++++++++++------------------- 2 files changed, 54 insertions(+), 54 deletions(-) diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 42d45ea..cb55deb 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -45,7 +45,8 @@ return require('packer').startup(function() { 'nvim-lua/popup.nvim' }, { 'nvim-lua/plenary.nvim' }, { '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'), }) @@ -84,19 +85,19 @@ return require('packer').startup(function() use({ 'hrsh7th/nvim-cmp', requires = { - { 'hrsh7th/cmp-buffer'}, - { 'hrsh7th/cmp-nvim-lsp'}, - { 'L3MON4D3/LuaSnip'}, - { 'saadparwaiz1/cmp_luasnip'}, - { 'hrsh7th/cmp-nvim-lua'}, - { 'octaltree/cmp-look'}, - { 'hrsh7th/cmp-path'}, - { 'hrsh7th/cmp-calc'}, - { 'f3fora/cmp-spell'}, - { 'hrsh7th/cmp-emoji'}, - { 'hrsh7th/cmp-cmdline'}, - { 'ray-x/cmp-treesitter'}, - { 'hrsh7th/cmp-nvim-lsp-signature-help'} + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-nvim-lsp' }, + { 'L3MON4D3/LuaSnip' }, + { 'saadparwaiz1/cmp_luasnip' }, + { 'hrsh7th/cmp-nvim-lua' }, + { 'octaltree/cmp-look' }, + { 'hrsh7th/cmp-path' }, + { 'hrsh7th/cmp-calc' }, + { 'f3fora/cmp-spell' }, + { 'hrsh7th/cmp-emoji' }, + { 'hrsh7th/cmp-cmdline' }, + { 'ray-x/cmp-treesitter' }, + { 'hrsh7th/cmp-nvim-lsp-signature-help' } }, config = get_setup('cmp'), }) @@ -199,12 +200,12 @@ return require('packer').startup(function() } use { 'ggandor/leap.nvim', - requires = {'tpope/vim-repeat'}, + requires = { 'tpope/vim-repeat' }, config = get_setup('my_leap') } use { 'mfussenegger/nvim-dap', - requires = {'mfussenegger/nvim-dap-python'}, + requires = { 'mfussenegger/nvim-dap-python' }, config = get_setup('my_dap') } if packer_bootstrap then diff --git a/lua/setup/my_lspconfig.lua b/lua/setup/my_lspconfig.lua index 184c7e7..4fbab14 100644 --- a/lua/setup/my_lspconfig.lua +++ b/lua/setup/my_lspconfig.lua @@ -101,12 +101,12 @@ local on_attach = function(client, bufnr) require("aerial").on_attach(client, bufnr) end -require('lspconfig')['pyright'].setup{ - on_attach = on_attach, +require('lspconfig')['pyright'].setup { + on_attach = on_attach, } -require('lspconfig')['cmake'].setup{ - on_attach = on_attach, +require('lspconfig')['cmake'].setup { + on_attach = on_attach, } -- require('lspconfig')['clangd'].setup{ @@ -120,50 +120,50 @@ require('clangd_extensions').setup({ }, }) -require('lspconfig')['jsonls'].setup{ - on_attach = on_attach, +require('lspconfig')['jsonls'].setup { + on_attach = on_attach, } local lua_rtp = vim.split(package.path, ';') table.insert(lua_rtp, 'lua/?.lua') table.insert(lua_rtp, 'lua/?/init.lua') -require('lspconfig').sumneko_lua.setup{ - 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', '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').sumneko_lua.setup { + 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', '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{ - on_attach = on_attach, +require('lspconfig')['dockerls'].setup { + on_attach = on_attach, } -require('lspconfig')['yamlls'].setup{ - on_attach = on_attach, - settings = { - yaml = { - validate = false - } +require('lspconfig')['yamlls'].setup { + on_attach = on_attach, + settings = { + yaml = { + validate = false } + } } local null_ls = require('null-ls') @@ -181,4 +181,3 @@ null_ls.setup({ }) vim.diagnostic.config({ virtual_text = false }) -