reformatted lua files to follow a single standard

This commit is contained in:
Luke Else 2023-03-13 20:43:34 +00:00
parent 92cec18df3
commit ac53964865
11 changed files with 52 additions and 51 deletions

View File

@ -1,24 +1,24 @@
vim.keymap.set("n", "<F5>", function() require('dap').continue() end)
vim.keymap.set("n", '<leader>b', function() require('dap').toggle_breakpoint() end)
vim.keymap.set('n', '<F5>', function() require('dap').continue() end)
vim.keymap.set('n', '<leader>b', function() require('dap').toggle_breakpoint() end)
require("dap").adapters.lldb = {
type = "executable",
command = "/usr/bin/lldb-vscode", -- adjust as needed
name = "lldb",
require('dap').adapters.lldb = {
type = 'executable',
command = '/usr/bin/lldb-vscode', -- adjust as needed
name = 'lldb',
}
local lldb = {
name = "Launch lldb",
type = "lldb", -- matches the adapter
request = "launch", -- could also attach to a currently running process
name = 'Launch lldb',
type = 'lldb', -- matches the adapter
request = 'launch', -- could also attach to a currently running process
program = function()
return vim.fn.input(
"Path to executable: ",
vim.fn.getcwd() .. "/",
"file"
'Path to executable: ',
vim.fn.getcwd() .. '/',
'file'
)
end,
cwd = "${workspaceFolder}",
cwd = '${workspaceFolder}',
stopOnEntry = false,
args = {},
runInTerminal = false,

View File

@ -1 +1 @@
vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
vim.keymap.set('n', '<leader>gs', vim.cmd.Git)

View File

@ -1,10 +1,10 @@
local mark = require("harpoon.mark")
local ui = require("harpoon.ui")
local mark = require('harpoon.mark')
local ui = require('harpoon.ui')
vim.keymap.set("n", "<leader>a", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set('n', '<leader>a', mark.add_file)
vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu)
vim.keymap.set("n", "<F1>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<F2>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<F3>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<F4>", function() ui.nav_file(4) end)
vim.keymap.set('n', '<F1>', function() ui.nav_file(1) end)
vim.keymap.set('n', '<F2>', function() ui.nav_file(2) end)
vim.keymap.set('n', '<F3>', function() ui.nav_file(3) end)
vim.keymap.set('n', '<F4>', function() ui.nav_file(4) end)

View File

@ -1,6 +1,6 @@
local lsp = require("lsp-zero")
local lsp = require('lsp-zero')
lsp.preset("recommended")
lsp.preset('recommended')
lsp.ensure_installed({
'rust_analyzer',
@ -25,7 +25,7 @@ local cmp_mappings = lsp.defaults.cmp_mappings({
['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
['<C-y>'] = cmp.mapping.confirm({ select = true }),
["<C-Space>"] = cmp.mapping.complete(),
['<C-Space>'] = cmp.mapping.complete(),
})
cmp_mappings['<Tab>'] = nil
@ -48,16 +48,16 @@ lsp.set_preferences({
lsp.on_attach(function(client, bufnr)
local opts = {buffer = bufnr, remap = false}
vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
vim.keymap.set("n", "<leader>fr", function() vim.lsp.buf.references() end, opts)
vim.keymap.set("n", "<leader>rn", function() vim.lsp.buf.rename() end, opts)
vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
vim.keymap.set('n', 'gd', function() vim.lsp.buf.definition() end, opts)
vim.keymap.set('n', 'K', function() vim.lsp.buf.hover() end, opts)
vim.keymap.set('n', '<leader>fr', function() vim.lsp.buf.references() end, opts)
vim.keymap.set('n', '<leader>rn', function() vim.lsp.buf.rename() end, opts)
vim.keymap.set('n', '<leader>vws', function() vim.lsp.buf.workspace_symbol() end, opts)
vim.keymap.set('n', '<leader>vd', function() vim.diagnostic.open_float() end, opts)
vim.keymap.set('n', '<leader>vca', function() vim.lsp.buf.code_action() end, opts)
vim.keymap.set('n', '[d', function() vim.diagnostic.goto_next() end, opts)
vim.keymap.set('n', ']d', function() vim.diagnostic.goto_prev() end, opts)
vim.keymap.set('i', '<C-h>', function() vim.lsp.buf.signature_help() end, opts)
end)
lsp.setup()

View File

@ -1,6 +1,6 @@
require'nvim-treesitter.configs'.setup {
-- A list of parser names, or "all"
ensure_installed = { "help", "c", "cpp", "lua", "rust" },
-- A list of parser names, or 'all'
ensure_installed = { 'help', 'c', 'cpp', 'lua', 'rust' },
-- Install parsers synchronously (only applied to `ensure_installed`)
sync_install = false,

View File

@ -1 +1 @@
vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle)

View File

@ -1 +1 @@
require("luke-else")
require('luke-else')

View File

@ -1,2 +1,2 @@
require("luke-else.packer")
require("luke-else.set")
require('luke-else.packer')
require('luke-else.set')

View File

@ -20,12 +20,12 @@ return require('packer').startup(function(use)
use('nvim-treesitter/nvim-treesitter', {run = ':TSUpdate'})
use('theprimeagen/harpoon')
use("mbbill/undotree")
use("tpope/vim-fugitive")
use('mbbill/undotree')
use('tpope/vim-fugitive')
use {
"windwp/nvim-autopairs",
config = function() require("nvim-autopairs").setup {} end
'windwp/nvim-autopairs',
config = function() require('nvim-autopairs').setup {} end
}
use {
@ -52,5 +52,6 @@ return require('packer').startup(function(use)
}
-- Debugger
use { "rcarriga/nvim-dap-ui", requires = {"mfussenegger/nvim-dap"} }
use 'nvim-lua/plenary.nvim'
use { 'rcarriga/nvim-dap-ui', requires = {'mfussenegger/nvim-dap'} }
end)

View File

@ -12,7 +12,7 @@ vim.opt.wrap = false
vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undodir = os.getenv('HOME') .. '/.vim/undodir'
vim.opt.undofile = true
vim.opt.hlsearch = false
@ -21,7 +21,7 @@ vim.opt.incsearch = true
vim.opt.termguicolors = true
vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")
vim.opt.signcolumn = 'yes'
vim.opt.isfname:append('@-@')
vim.opt.updatetime = 50

View File

@ -35,8 +35,8 @@ yay brave-bin
mkdir ~/git
cd ~/git
git config --global user.name "Luke Else"
git config --global user.email "mail@luke-else.co.uk"
git config --global user.name 'Luke Else'
git config --global user.email 'mail@luke-else.co.uk'
git clone ssh://git@git.luke-else.co.uk:222/luke-else/dwm.git
git clone ssh://git@git.luke-else.co.uk:222/luke-else/dmenu.git