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 pn pnpm
|
||||
alias nv 'neovide --fork; and clear'
|
||||
alias hx helix
|
||||
|
||||
switch "$uname"
|
||||
case Linux
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
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
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,7 +23,6 @@ set termguicolors
|
|||
|
||||
inoremap jj <Esc>
|
||||
|
||||
let mapleader = ','
|
||||
nnoremap <leader>f <cmd>ALEFix<cr>
|
||||
nnoremap <leader>a <cmd>ALEToggle<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:ale_linters = {
|
||||
\ 'javascript': ['eslint', 'stylelint'],
|
||||
\ 'typescript': ['eslint', 'stylelint'],
|
||||
\ 'javascriptreact': ['eslint', 'stylelint'],
|
||||
\ 'typescriptreact': ['eslint', 'stylelint'],
|
||||
\ 'javascript': ['eslint', 'stylelint', 'biome'],
|
||||
\ 'typescript': ['eslint', 'stylelint', 'biome'],
|
||||
\ 'javascriptreact': ['eslint', 'stylelint', 'biome'],
|
||||
\ 'typescriptreact': ['eslint', 'stylelint', 'biome'],
|
||||
\ 'go': ['golint', 'go vet'],
|
||||
\ 'vue': ['eslint', 'stylelint'],
|
||||
\ 'make': ['checkmake'],
|
||||
|
@ -86,17 +85,17 @@ let g:ale_linters = {
|
|||
let g:ale_fixers = {
|
||||
\ 'go': ['goimports', 'remove_trailing_lines', 'trim_whitespace'],
|
||||
\ 'graphql': ['prettier'],
|
||||
\ 'javascript': ['prettier'],
|
||||
\ 'typescript': ['prettier'],
|
||||
\ 'javascriptreact': ['prettier'],
|
||||
\ 'typescriptreact': ['prettier'],
|
||||
\ 'javascript': ['prettier', 'biome'],
|
||||
\ 'typescript': ['prettier', 'biome'],
|
||||
\ 'javascriptreact': ['prettier', 'biome'],
|
||||
\ 'typescriptreact': ['prettier', 'biome'],
|
||||
\ 'vue': ['prettier'],
|
||||
\ 'css': ['prettier'],
|
||||
\ 'yaml': ['prettier'],
|
||||
\ 'json': ['prettier'],
|
||||
\ 'yaml': ['prettier', 'biome'],
|
||||
\ 'json': ['prettier', 'biome'],
|
||||
\ 'dart': ['dartfmt'],
|
||||
\ 'html': ['prettier'],
|
||||
\ 'markdown': ['prettier'],
|
||||
\ 'html': ['prettier', 'biome'],
|
||||
\ 'markdown': ['prettier', 'biome'],
|
||||
\ 'make': ['remove_trailing_lines', 'trim_whitespace'],
|
||||
\ 'elixir': ['mix_format'],
|
||||
\ 'terraform': ['terraform'],
|
||||
|
|
|
@ -17,7 +17,7 @@ plug("nvim-tree/nvim-web-devicons")
|
|||
plug("ms-jpq/coq_nvim", { ["branch"] = "coq" })
|
||||
plug("ms-jpq/coq.artifacts", { ["branch"] = "artifacts" })
|
||||
plug("folke/noice.nvim")
|
||||
plug("ggandor/leap.nvim")
|
||||
plug("folke/flash.nvim")
|
||||
plug("folke/zen-mode.nvim")
|
||||
plug("folke/twilight.nvim")
|
||||
plug("neovim/nvim-lspconfig")
|
||||
|
@ -67,13 +67,15 @@ require("lualine").setup({
|
|||
|
||||
require("zen-mode").setup({
|
||||
window = {
|
||||
backdrop = 1,
|
||||
backdrop = 0.95,
|
||||
},
|
||||
plugins = {
|
||||
twilight = { enabled = false }, -- enable to start Twilight when zen mode opens
|
||||
},
|
||||
})
|
||||
require("symbols-outline").setup({
|
||||
autofold_depth = 2,
|
||||
})
|
||||
require("leap").create_default_mappings()
|
||||
|
||||
require("notify").setup({
|
||||
background_colour = "#000000",
|
||||
|
@ -111,6 +113,7 @@ require("nvim-treesitter.configs").setup({
|
|||
"lua",
|
||||
"vim",
|
||||
"regex",
|
||||
"bash",
|
||||
"fish",
|
||||
"typescript",
|
||||
"javascript",
|
||||
|
@ -119,6 +122,8 @@ require("nvim-treesitter.configs").setup({
|
|||
"elixir",
|
||||
"vue",
|
||||
"groovy",
|
||||
"hcl",
|
||||
"terraform",
|
||||
},
|
||||
|
||||
-- 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.
|
||||
-- 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", "[d", vim.diagnostic.goto_prev, opts)
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts)
|
||||
|
@ -165,7 +182,7 @@ local on_attach = function(client, bufnr)
|
|||
|
||||
-- Mappings.
|
||||
-- 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", "<C-k>", vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, bufopts)
|
||||
|
|
Loading…
Reference in New Issue