fix: format config files
This commit is contained in:
parent
0dcc4fa0ed
commit
580a30e305
8 changed files with 32 additions and 33 deletions
17
init.lua
17
init.lua
|
@ -32,14 +32,14 @@ vim.opt.incsearch = true
|
||||||
|
|
||||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if not vim.loop.fs_stat(lazypath) then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
vim.fn.system({
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--filter=blob:none",
|
"--filter=blob:none",
|
||||||
"https://github.com/folke/lazy.nvim.git",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
"--branch=stable", -- latest stable release
|
"--branch=stable", -- latest stable release
|
||||||
lazypath,
|
lazypath,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
@ -61,4 +61,3 @@ end
|
||||||
|
|
||||||
require("lazy").setup("plugins")
|
require("lazy").setup("plugins")
|
||||||
require("keybinds")
|
require("keybinds")
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Go to split on left" })
|
vim.keymap.set("n", "<C-h>", "<C-w><C-h>", { desc = "Go to split on left" })
|
||||||
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Go to split above"})
|
vim.keymap.set("n", "<C-j>", "<C-w><C-j>", { desc = "Go to split above" })
|
||||||
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Go to split below"})
|
vim.keymap.set("n", "<C-k>", "<C-w><C-k>", { desc = "Go to split below" })
|
||||||
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Go to split on right" })
|
vim.keymap.set("n", "<C-l>", "<C-w><C-l>", { desc = "Go to split on right" })
|
||||||
|
|
||||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move lines under cursor up" })
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv", { desc = "Move lines under cursor up" })
|
||||||
|
@ -14,4 +14,5 @@ vim.keymap.set("x", "<Leader>p", "\"_dP", { desc = "Paste without replacing clip
|
||||||
vim.keymap.set("n", "<Leader>y", "\"*y", { desc = "Yank into system clipboard" })
|
vim.keymap.set("n", "<Leader>y", "\"*y", { desc = "Yank into system clipboard" })
|
||||||
vim.keymap.set("v", "<Leader>y", "\"*y", { desc = "Yank into system clipboard" })
|
vim.keymap.set("v", "<Leader>y", "\"*y", { desc = "Yank into system clipboard" })
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], { desc = "Like `ciw` for any highlighted text (doesn't have to be word)"})
|
vim.keymap.set("n", "<leader>s", [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
|
||||||
|
{ desc = "Like `ciw` for any highlighted text (doesn't have to be word)" })
|
||||||
|
|
|
@ -15,14 +15,14 @@ return {
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-o>"] = cmp.mapping.complete(),
|
["<C-o>"] = cmp.mapping.complete(),
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
["<Tab>"] = cmp.mapping(function (fallback)
|
["<Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_next_item()
|
cmp.select_next_item()
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
end, { "i" }),
|
end, { "i" }),
|
||||||
["<S-Tab>"] = cmp.mapping(function (fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
else
|
else
|
||||||
|
@ -45,8 +45,8 @@ return {
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
{ name = "luasnip" }
|
{ name = "luasnip" }
|
||||||
}, {
|
}, {
|
||||||
{ name = "buffer" }
|
{ name = "buffer" }
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
return {
|
return {
|
||||||
"tpope/vim-fugitive",
|
"tpope/vim-fugitive",
|
||||||
config = function ()
|
config = function()
|
||||||
vim.keymap.set("n", "<Leader>gs", vim.cmd.Git, { desc = "View `git status`" })
|
vim.keymap.set("n", "<Leader>gs", vim.cmd.Git, { desc = "View `git status`" })
|
||||||
vim.keymap.set("n", "gh", "<cmd>diffget //2<CR>", { desc = "Pick gitdiff on left" })
|
vim.keymap.set("n", "gh", "<cmd>diffget //2<CR>", { desc = "Pick gitdiff on left" })
|
||||||
vim.keymap.set("n", "gl", "<cmd>diffget //3<CR>", { desc = "Pick gitdiff on right" })
|
vim.keymap.set("n", "gl", "<cmd>diffget //3<CR>", { desc = "Pick gitdiff on right" })
|
||||||
vim.keymap.set("n", "<Leader>gp", ":Git push<CR>", { desc = "Run `git push`" })
|
vim.keymap.set("n", "<Leader>gp", ":Git push<CR>", { desc = "Run `git push`" })
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
return {
|
return {
|
||||||
"m4xshen/hardtime.nvim",
|
"m4xshen/hardtime.nvim",
|
||||||
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
||||||
opts = {
|
opts = {
|
||||||
disable_mouse = true,
|
disable_mouse = true,
|
||||||
disabled_keys = {
|
disabled_keys = {
|
||||||
-- Drill Sergeant Demchuk!
|
-- Drill Sergeant Demchuk!
|
||||||
["<Up>"] = {"", "i"},
|
["<Up>"] = { "", "i" },
|
||||||
["<Down>"] = {"", "i"},
|
["<Down>"] = { "", "i" },
|
||||||
["<Left>"] = {"", "i"},
|
["<Left>"] = { "", "i" },
|
||||||
["<Right>"] = {"", "i"}
|
["<Right>"] = { "", "i" }
|
||||||
},
|
},
|
||||||
disabled_filetypes = {
|
disabled_filetypes = {
|
||||||
"checkhealth",
|
"checkhealth",
|
||||||
|
|
|
@ -4,7 +4,7 @@ return {
|
||||||
"BufReadPre",
|
"BufReadPre",
|
||||||
"BufNewFile",
|
"BufNewFile",
|
||||||
},
|
},
|
||||||
config = function ()
|
config = function()
|
||||||
local lint = require("lint")
|
local lint = require("lint")
|
||||||
|
|
||||||
lint.linters_by_ft = {
|
lint.linters_by_ft = {
|
||||||
|
@ -18,7 +18,7 @@ return {
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||||
group = lint_augroup,
|
group = lint_augroup,
|
||||||
callback = function ()
|
callback = function()
|
||||||
lint.try_lint()
|
lint.try_lint()
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,7 +7,7 @@ return {
|
||||||
local builtin = require('telescope.builtin')
|
local builtin = require('telescope.builtin')
|
||||||
|
|
||||||
vim.keymap.set('n', '<Leader>pp', builtin.git_files, { desc = "Search git_files" })
|
vim.keymap.set('n', '<Leader>pp', builtin.git_files, { desc = "Search git_files" })
|
||||||
vim.keymap.set('n', '<Leader>pf', builtin.find_files, { desc = "Search all files "})
|
vim.keymap.set('n', '<Leader>pf', builtin.find_files, { desc = "Search all files " })
|
||||||
vim.keymap.set('n', '<Leader>fh', builtin.help_tags, { desc = "View help tags" })
|
vim.keymap.set('n', '<Leader>fh', builtin.help_tags, { desc = "View help tags" })
|
||||||
vim.keymap.set('n', '<Leader>ps', function()
|
vim.keymap.set('n', '<Leader>ps', function()
|
||||||
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
builtin.grep_string({ search = vim.fn.input("Grep > ") })
|
||||||
|
@ -18,11 +18,11 @@ return {
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("telescope").setup {
|
require("telescope").setup {
|
||||||
extensions = {
|
extensions = {
|
||||||
["ui-select"] = {
|
["ui-select"] = {
|
||||||
require("telescope.themes").get_dropdown {}
|
require("telescope.themes").get_dropdown {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require("telescope").load_extension("ui-select")
|
require("telescope").load_extension("ui-select")
|
||||||
|
|
|
@ -4,4 +4,4 @@ return {
|
||||||
config = function()
|
config = function()
|
||||||
vim.keymap.set("n", "<Leader>tt", ":TroubleToggle<CR>", { desc = "Toggle Trouble" })
|
vim.keymap.set("n", "<Leader>tt", ":TroubleToggle<CR>", { desc = "Toggle Trouble" })
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue