format all lua files

This commit is contained in:
2023-01-29 11:55:25 +01:00
parent fa0d4ffd8f
commit b87bbaee74
19 changed files with 179 additions and 453 deletions

View File

@ -77,12 +77,12 @@ return {
},
config = function()
local dap = require('dap')
vim.fn.sign_define('DapBreakpoint', {text='🛑', texthl='', linehl='', numhl=''})
require("cmp_dap").is_dap_buffer()
vim.fn.sign_define('DapBreakpoint', { text = '🛑', texthl = '', linehl = '', numhl = '' })
require('cmp_dap').is_dap_buffer()
-- make sure we can exit the terminal with esc
vim.api.nvim_create_autocmd({ "TermOpen" }, {
vim.api.nvim_create_autocmd({ 'TermOpen' }, {
pattern = { '*dap-terminal*' },
callback = function()
local opts = { noremap = true }
@ -99,13 +99,13 @@ return {
end
local function getPythonEnv()
local venv = os.getenv("VIRTUAL_ENV")
local venv = os.getenv('VIRTUAL_ENV')
if venv ~= nil then
return string.format("%s/%s", venv, getVenvSuffix())
return string.format('%s/%s', venv, getVenvSuffix())
end
local conda = os.getenv("CONDA_PREFIX")
local conda = os.getenv('CONDA_PREFIX')
if conda ~= nil then
return string.format("%s/%s", conda, 'python.exe')
return string.format('%s/%s', conda, 'python.exe')
end
local cwd = vim.fn.getcwd()
@ -144,15 +144,15 @@ return {
};
}
local dapui = require("dapui")
local dapui = require('dapui')
dapui.setup()
dap.listeners.after.event_initialized["dapui_config"] = function()
dap.listeners.after.event_initialized['dapui_config'] = function()
dapui.open({})
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dap.listeners.before.event_terminated['dapui_config'] = function()
dapui.close({})
end
dap.listeners.before.event_exited["dapui_config"] = function()
dap.listeners.before.event_exited['dapui_config'] = function()
dapui.close({})
end
@ -160,9 +160,9 @@ return {
{
type = 'python';
request = 'launch';
name = "Launch file with venv";
name = 'Launch file with venv';
justMyCode = false;
program = "${file}";
program = '${file}';
cwd = vim.fn.getcwd();
pythonPath = getPythonEnv
},
@ -182,7 +182,7 @@ return {
-- CPP
dap.adapters.codelldb = {
type = 'server',
port = "${port}",
port = '${port}',
executable = {
-- CHANGE THIS to your path!
command = masonpath .. '/bin/codelldb.cmd',
@ -207,9 +207,9 @@ return {
dap.configurations.cpp = {
{
name = "Launch codelldb",
type = "codelldb",
request = "launch",
name = 'Launch codelldb',
type = 'codelldb',
request = 'launch',
program = function()
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file')
end,