mirror of https://github.com/mitchell/dotfiles.git
Switch from leap to flash.nvim and add biome to ALE config
This commit is contained in:
parent
7d9a714495
commit
4d4e715cb1
|
@ -14,6 +14,7 @@ function define_aliases -a uname -d 'Defines aliases for commonly used commands'
|
||||||
alias bb 'bun --bun'
|
alias bb 'bun --bun'
|
||||||
alias pn pnpm
|
alias pn pnpm
|
||||||
alias nv 'neovide --fork; and clear'
|
alias nv 'neovide --fork; and clear'
|
||||||
|
alias hx helix
|
||||||
|
|
||||||
switch "$uname"
|
switch "$uname"
|
||||||
case Linux
|
case Linux
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
function ssh_agent_startup -d 'Start ssh agent and set env vars'
|
function ssh_agent_startup -d 'Start ssh agent and set env vars'
|
||||||
if test -z "$SSH_AUTH_SOCK"; and test -z "$SSH_AGENT_PID"
|
if test -z "$SSH_AUTH_SOCK"; and test -z "$SSH_AGENT_PID"; and test -z "$SSH_CLIENT"
|
||||||
eval (ssh-agent -c) >/dev/null 2>&1
|
eval (ssh-agent -c) >/dev/null 2>&1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,7 +23,6 @@ set termguicolors
|
||||||
|
|
||||||
inoremap jj <Esc>
|
inoremap jj <Esc>
|
||||||
|
|
||||||
let mapleader = ','
|
|
||||||
nnoremap <leader>f <cmd>ALEFix<cr>
|
nnoremap <leader>f <cmd>ALEFix<cr>
|
||||||
nnoremap <leader>a <cmd>ALEToggle<cr>
|
nnoremap <leader>a <cmd>ALEToggle<cr>
|
||||||
nnoremap <leader>nn <cmd>Neotree toggle show git_status<cr>
|
nnoremap <leader>nn <cmd>Neotree toggle show git_status<cr>
|
||||||
|
@ -61,10 +60,10 @@ let g:ale_completion_enabled = 0
|
||||||
let g:pencil#map#suspend_af = 'K'
|
let g:pencil#map#suspend_af = 'K'
|
||||||
|
|
||||||
let g:ale_linters = {
|
let g:ale_linters = {
|
||||||
\ 'javascript': ['eslint', 'stylelint'],
|
\ 'javascript': ['eslint', 'stylelint', 'biome'],
|
||||||
\ 'typescript': ['eslint', 'stylelint'],
|
\ 'typescript': ['eslint', 'stylelint', 'biome'],
|
||||||
\ 'javascriptreact': ['eslint', 'stylelint'],
|
\ 'javascriptreact': ['eslint', 'stylelint', 'biome'],
|
||||||
\ 'typescriptreact': ['eslint', 'stylelint'],
|
\ 'typescriptreact': ['eslint', 'stylelint', 'biome'],
|
||||||
\ 'go': ['golint', 'go vet'],
|
\ 'go': ['golint', 'go vet'],
|
||||||
\ 'vue': ['eslint', 'stylelint'],
|
\ 'vue': ['eslint', 'stylelint'],
|
||||||
\ 'make': ['checkmake'],
|
\ 'make': ['checkmake'],
|
||||||
|
@ -86,17 +85,17 @@ let g:ale_linters = {
|
||||||
let g:ale_fixers = {
|
let g:ale_fixers = {
|
||||||
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'graphql': ['prettier'],
|
\ 'graphql': ['prettier'],
|
||||||
\ 'javascript': ['prettier'],
|
\ 'javascript': ['prettier', 'biome'],
|
||||||
\ 'typescript': ['prettier'],
|
\ 'typescript': ['prettier', 'biome'],
|
||||||
\ 'javascriptreact': ['prettier'],
|
\ 'javascriptreact': ['prettier', 'biome'],
|
||||||
\ 'typescriptreact': ['prettier'],
|
\ 'typescriptreact': ['prettier', 'biome'],
|
||||||
\ 'vue': ['prettier'],
|
\ 'vue': ['prettier'],
|
||||||
\ 'css': ['prettier'],
|
\ 'css': ['prettier'],
|
||||||
\ 'yaml': ['prettier'],
|
\ 'yaml': ['prettier', 'biome'],
|
||||||
\ 'json': ['prettier'],
|
\ 'json': ['prettier', 'biome'],
|
||||||
\ 'dart': ['dartfmt'],
|
\ 'dart': ['dartfmt'],
|
||||||
\ 'html': ['prettier'],
|
\ 'html': ['prettier', 'biome'],
|
||||||
\ 'markdown': ['prettier'],
|
\ 'markdown': ['prettier', 'biome'],
|
||||||
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
|
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'elixir': ['mix_format'],
|
\ 'elixir': ['mix_format'],
|
||||||
\ 'terraform': ['terraform'],
|
\ 'terraform': ['terraform'],
|
||||||
|
|
|
@ -17,7 +17,7 @@ plug("nvim-tree/nvim-web-devicons")
|
||||||
plug("ms-jpq/coq_nvim", { ["branch"] = "coq" })
|
plug("ms-jpq/coq_nvim", { ["branch"] = "coq" })
|
||||||
plug("ms-jpq/coq.artifacts", { ["branch"] = "artifacts" })
|
plug("ms-jpq/coq.artifacts", { ["branch"] = "artifacts" })
|
||||||
plug("folke/noice.nvim")
|
plug("folke/noice.nvim")
|
||||||
plug("ggandor/leap.nvim")
|
plug("folke/flash.nvim")
|
||||||
plug("folke/zen-mode.nvim")
|
plug("folke/zen-mode.nvim")
|
||||||
plug("folke/twilight.nvim")
|
plug("folke/twilight.nvim")
|
||||||
plug("neovim/nvim-lspconfig")
|
plug("neovim/nvim-lspconfig")
|
||||||
|
@ -67,13 +67,15 @@ require("lualine").setup({
|
||||||
|
|
||||||
require("zen-mode").setup({
|
require("zen-mode").setup({
|
||||||
window = {
|
window = {
|
||||||
backdrop = 1,
|
backdrop = 0.95,
|
||||||
|
},
|
||||||
|
plugins = {
|
||||||
|
twilight = { enabled = false }, -- enable to start Twilight when zen mode opens
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
require("symbols-outline").setup({
|
require("symbols-outline").setup({
|
||||||
autofold_depth = 2,
|
autofold_depth = 2,
|
||||||
})
|
})
|
||||||
require("leap").create_default_mappings()
|
|
||||||
|
|
||||||
require("notify").setup({
|
require("notify").setup({
|
||||||
background_colour = "#000000",
|
background_colour = "#000000",
|
||||||
|
@ -111,6 +113,7 @@ require("nvim-treesitter.configs").setup({
|
||||||
"lua",
|
"lua",
|
||||||
"vim",
|
"vim",
|
||||||
"regex",
|
"regex",
|
||||||
|
"bash",
|
||||||
"fish",
|
"fish",
|
||||||
"typescript",
|
"typescript",
|
||||||
"javascript",
|
"javascript",
|
||||||
|
@ -119,6 +122,8 @@ require("nvim-treesitter.configs").setup({
|
||||||
"elixir",
|
"elixir",
|
||||||
"vue",
|
"vue",
|
||||||
"groovy",
|
"groovy",
|
||||||
|
"hcl",
|
||||||
|
"terraform",
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Automatically install missing parsers when entering buffer
|
-- Automatically install missing parsers when entering buffer
|
||||||
|
@ -149,9 +154,21 @@ require("nvim-treesitter.configs").setup({
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Map Leader
|
||||||
|
vim.g.mapleader = ","
|
||||||
|
|
||||||
|
-- Flash config
|
||||||
|
local flash = require("flash")
|
||||||
|
flash.setup()
|
||||||
|
vim.keymap.set({ "n", "x", "o" }, "s", flash.jump, { desc = "Flash" })
|
||||||
|
vim.keymap.set({ "n", "x", "o" }, "S", flash.treesitter, { desc = "Flash Treesitter" })
|
||||||
|
vim.keymap.set("o", "r", flash.remote, { desc = "Remote Flash" })
|
||||||
|
vim.keymap.set({ "o", "x" }, "R", flash.treesitter_search, { desc = "Treesitter Search" })
|
||||||
|
vim.keymap.set("c", "<c-s>", flash.toggle, { desc = "Toggle Flash Search" })
|
||||||
|
|
||||||
-- LSP Mappings.
|
-- LSP Mappings.
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { silent = true }
|
||||||
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
|
vim.keymap.set("n", "<leader>d", vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts)
|
||||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
||||||
|
@ -165,7 +182,7 @@ local on_attach = function(client, bufnr)
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
local bufopts = { silent = true, buffer = bufnr }
|
||||||
vim.keymap.set("n", "<leader>h", vim.lsp.buf.hover, bufopts)
|
vim.keymap.set("n", "<leader>h", vim.lsp.buf.hover, bufopts)
|
||||||
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
|
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
|
||||||
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts)
|
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts)
|
||||||
|
|
2
sync
2
sync
|
@ -92,7 +92,7 @@ end
|
||||||
function install_nvim_plugins
|
function install_nvim_plugins
|
||||||
command -q nvim
|
command -q nvim
|
||||||
and nvim +PlugUpgrade +PlugUpdate +UpdateRemotePlugins +qa
|
and nvim +PlugUpgrade +PlugUpdate +UpdateRemotePlugins +qa
|
||||||
and nvim +COQdeps +q +bnext
|
and nvim +COQdeps +bnext +bdelete
|
||||||
end
|
end
|
||||||
|
|
||||||
function sync_git_config
|
function sync_git_config
|
||||||
|
|
Loading…
Reference in New Issue