style(nvim): run stylua
This commit is contained in:
parent
2cee68f31d
commit
66b491395d
|
@ -14,10 +14,7 @@ local function set_autocmd()
|
||||||
]]
|
]]
|
||||||
|
|
||||||
-- Automatically resize buffers when Vim is resized.
|
-- Automatically resize buffers when Vim is resized.
|
||||||
vim.api.nvim_create_autocmd(
|
vim.api.nvim_create_autocmd("VimResized *", { command = ":wincmd =" })
|
||||||
"VimResized *",
|
|
||||||
{ command = ":wincmd =" }
|
|
||||||
)
|
|
||||||
|
|
||||||
-- Cursorline highlighting control.
|
-- Cursorline highlighting control.
|
||||||
-- Only have it on in the current buffer.
|
-- Only have it on in the current buffer.
|
||||||
|
|
|
@ -73,7 +73,7 @@ return packer.startup(function()
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
run = ":TSUpdate",
|
run = ":TSUpdate",
|
||||||
}
|
}
|
||||||
use 'nvim-treesitter/nvim-treesitter-textobjects'
|
use "nvim-treesitter/nvim-treesitter-textobjects"
|
||||||
|
|
||||||
-- Completion
|
-- Completion
|
||||||
use {
|
use {
|
||||||
|
@ -114,7 +114,7 @@ return packer.startup(function()
|
||||||
use { "nvim-telescope/telescope-ui-select.nvim" }
|
use { "nvim-telescope/telescope-ui-select.nvim" }
|
||||||
|
|
||||||
-- Git
|
-- Git
|
||||||
use 'TimUntersberger/neogit'
|
use "TimUntersberger/neogit"
|
||||||
|
|
||||||
-- Databases
|
-- Databases
|
||||||
use "tpope/vim-dadbod"
|
use "tpope/vim-dadbod"
|
||||||
|
|
|
@ -8,7 +8,8 @@ local t = ls.text_node
|
||||||
|
|
||||||
local M = {
|
local M = {
|
||||||
|
|
||||||
drupalclass = fmta([[
|
drupalclass = fmta(
|
||||||
|
[[
|
||||||
<<?php
|
<<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
@ -22,7 +23,7 @@ local M = {
|
||||||
}]],
|
}]],
|
||||||
{
|
{
|
||||||
f(function()
|
f(function()
|
||||||
local filepath = vim.fn.expand('%:h')
|
local filepath = vim.fn.expand "%:h"
|
||||||
local filepath_parts = vim.fn.split(filepath, "/")
|
local filepath_parts = vim.fn.split(filepath, "/")
|
||||||
|
|
||||||
if not vim.tbl_contains(filepath_parts, "src") then
|
if not vim.tbl_contains(filepath_parts, "src") then
|
||||||
|
@ -54,7 +55,9 @@ local M = {
|
||||||
|
|
||||||
return table.concat(namespace_parts, "\\")
|
return table.concat(namespace_parts, "\\")
|
||||||
end),
|
end),
|
||||||
f(function() return vim.fn.expand("%:t:r"); end),
|
f(function()
|
||||||
|
return vim.fn.expand "%:t:r"
|
||||||
|
end),
|
||||||
i(0),
|
i(0),
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
|
@ -36,7 +36,7 @@ telescope_mapper("<leader>dl", "diagnostics")
|
||||||
telescope_mapper("<leader>en", "edit_neovim")
|
telescope_mapper("<leader>en", "edit_neovim")
|
||||||
telescope_mapper("<leader>ez", "edit_zsh")
|
telescope_mapper("<leader>ez", "edit_zsh")
|
||||||
|
|
||||||
local nmap = require "opdavies.keymap".nmap
|
local nmap = require("opdavies.keymap").nmap
|
||||||
|
|
||||||
nmap { "<leader>gm", telescope.extensions.git_worktree.create_git_worktree }
|
nmap { "<leader>gm", telescope.extensions.git_worktree.create_git_worktree }
|
||||||
nmap { "<leader>gw", telescope.extensions.git_worktree.git_worktrees }
|
nmap { "<leader>gw", telescope.extensions.git_worktree.git_worktrees }
|
||||||
|
|
|
@ -10,8 +10,7 @@ local Job = require "plenary.job"
|
||||||
-- https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes#dont-preview-binaries
|
-- https://github.com/nvim-telescope/telescope.nvim/wiki/Configuration-Recipes#dont-preview-binaries
|
||||||
local new_maker = function(filepath, bufnr, opts)
|
local new_maker = function(filepath, bufnr, opts)
|
||||||
filepath = vim.fn.expand(filepath)
|
filepath = vim.fn.expand(filepath)
|
||||||
Job
|
Job:new({
|
||||||
:new({
|
|
||||||
command = "file",
|
command = "file",
|
||||||
args = { "--mime-type", "-b", filepath },
|
args = { "--mime-type", "-b", filepath },
|
||||||
on_exit = function(j)
|
on_exit = function(j)
|
||||||
|
@ -24,12 +23,11 @@ local new_maker = function(filepath, bufnr, opts)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
})
|
}):sync()
|
||||||
:sync()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local action_layout = require 'telescope.actions.layout'
|
local action_layout = require "telescope.actions.layout"
|
||||||
local actions = require 'telescope.actions'
|
local actions = require "telescope.actions"
|
||||||
|
|
||||||
telescope.setup {
|
telescope.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
|
|
Loading…
Reference in a new issue