add niri and update nvim config
This commit is contained in:
1
.config/nvim/after/ftplugin/markdown.lua
Normal file
1
.config/nvim/after/ftplugin/markdown.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.opt_local.conceallevel = 1
|
||||
@@ -1,49 +1,49 @@
|
||||
{
|
||||
"color-picker.nvim": { "branch": "master", "commit": "06cb5f853535dea529a523e9a0e8884cdf9eba4d" },
|
||||
"conform.nvim": { "branch": "master", "commit": "04bfa5f35706410376bf7618a01fcf44e3f35b59" },
|
||||
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
||||
"coq.artifacts": { "branch": "artifacts", "commit": "ef5f21d638ccc456cfa5b8d0ab37093cefe48c8b" },
|
||||
"coq_nvim": { "branch": "coq", "commit": "2732cfa52fffd32d535c782f418da6fb8bf331ea" },
|
||||
"crates.nvim": { "branch": "main", "commit": "a49df0f70171adc77704eac70dd2c0d179065933" },
|
||||
"everforest": { "branch": "main", "commit": "8db2bd8af38ed7b1bd12baa9a28858ff92e839bf" },
|
||||
"fzf-lua": { "branch": "main", "commit": "15a6d0d8b8c13f703053be9a7d6e2f5dab581749" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" },
|
||||
"markview.nvim": { "branch": "main", "commit": "2fddeef5755f434a24bc452b0666f1ffd9882dae" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1ec4da522fa49dcecee8d190efda273464dd2192" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "86389a3dd687cfaa647b6f44731e492970034baa" },
|
||||
"mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" },
|
||||
"mini.nvim": { "branch": "main", "commit": "0069a71538020a77a19f4f8d5e89f066e264a6dc" },
|
||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "cea666ef965884414b1b71f6b39a537f9238bdb2" },
|
||||
"noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" },
|
||||
"coq_nvim": { "branch": "coq", "commit": "d939a34ceb2b57d2937890337a4aa75eb55e18a8" },
|
||||
"crates.nvim": { "branch": "main", "commit": "ac9fa498a9edb96dc3056724ff69d5f40b898453" },
|
||||
"everforest": { "branch": "main", "commit": "557bce922401e247a596583679bc181d4d688554" },
|
||||
"fzf-lua": { "branch": "main", "commit": "518ab7a64ca65899a218f364f0fb9e38ff7bdcc8" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"markview.nvim": { "branch": "main", "commit": "900272b66043d5e3d3f5a74b34eb4e93d3a0ce88" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "80c0130c5f16b551865a69e832f1feadeedb5fbe" },
|
||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"mini.nvim": { "branch": "main", "commit": "4f53281c51ad9384ef790178b9643740fa763979" },
|
||||
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
|
||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
|
||||
"nvim-dap": { "branch": "master", "commit": "f777d1d20ed50c2f312e286892c062d9c2f1c6fe" },
|
||||
"nvim-dap": { "branch": "master", "commit": "cdfd55a133f63228c55f91378f12908cb2a78ded" },
|
||||
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
|
||||
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
|
||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||
"nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
|
||||
"nvim-lint": { "branch": "master", "commit": "7ef127aaede2a4d5ad8df8321e2eb4e567f29594" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "d64ea08d8033543a61af35f2f23cac0f0d05f7b4" },
|
||||
"nvim-lint": { "branch": "master", "commit": "ca6ea12daf0a4d92dc24c5c9ae22a1f0418ade37" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
|
||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||
"nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" },
|
||||
"nvim-possession": { "branch": "main", "commit": "49bc69d7dd72207973e2537d73bfd9f3c1bf2678" },
|
||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
"nvim-possession": { "branch": "main", "commit": "fa1a37ffcba9e8d708192ebb4b031b53679f0246" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "dca8726fea2c14e1ce6adbaa76a04816fbfaff61" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "c2599a81ecabaae07c49ff9b45dcd032a8d90f1a" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "64dd4cf3f6fd0ab17622c5ce15c91fc539c3f24a" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "5ca4aaa6efdcc59be46b95a3e876300cfead05ef" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
||||
"obsidian.nvim": { "branch": "main", "commit": "f6b241fa08d157701b9b0850b1251d98f86b122e" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "e9c5aaba16fead831379d5f44617547a90b913c7" },
|
||||
"smart-open.nvim": { "branch": "0.3.x", "commit": "e7f27218bd43de5262d3e8e3e84a135737ca6942" },
|
||||
"smart-open.nvim": { "branch": "0.3.x", "commit": "918c97cac0c33f7a116a822df144bc5bbefa4490" },
|
||||
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
|
||||
"store.nvim": { "branch": "main", "commit": "1359fe210f619f8e54cb4bc5fdcc40c1edc18876" },
|
||||
"store.nvim": { "branch": "main", "commit": "d53e9835ac10d1c4c21f261029059bfb25931b45" },
|
||||
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
|
||||
"typr": { "branch": "main", "commit": "bdd9ef7143702851edd1dac85101e0a537056d2f" },
|
||||
"undotree": { "branch": "main", "commit": "eab459ab87dd249617b5f7187bb69e614a083047" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"typr": { "branch": "main", "commit": "584e4ef34dea25a4035627794322f315b22d1253" },
|
||||
"undotree": { "branch": "main", "commit": "3976ed63d7fb0cc47f6a778e230a390a399df69c" },
|
||||
"virtual-types.nvim": { "branch": "master", "commit": "d652ec0b1781bbb0e83dc588fb62d638006cf61e" },
|
||||
"volt": { "branch": "main", "commit": "7b8c5e790120d9f08c8487dcb80692db6d2087a1" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" },
|
||||
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" },
|
||||
"wilder.nvim": { "branch": "master", "commit": "679f348dc90d80ff9ba0e7c470c40a4d038dcecf" }
|
||||
}
|
||||
|
||||
17
.config/nvim/lua/aaron/init/init.lua
Normal file
17
.config/nvim/lua/aaron/init/init.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
--[[ Plugins:
|
||||
- lazy vim -- package manager
|
||||
- mini.bracketed -- move to textobjects with brackets
|
||||
- mini.ai --selection with textobjects, such as "indside quotes, parens etc"
|
||||
- mini.indentscope -- show indent scope
|
||||
- mini.cursorword -- highlight identical words
|
||||
- gitsigns -- inline git info, stage by line, show deleted and more
|
||||
- whichkey -- ongoing keybind docu
|
||||
- telescope -- fast open anything
|
||||
- treesitter -- syntax tree
|
||||
- undotree -- view the undotree
|
||||
|
||||
- lsp?
|
||||
- autocomplete > coq.nvim?
|
||||
|
||||
- sugar > lualine?
|
||||
]]
|
||||
3
.config/nvim/lua/native_pack_test/init.lua
Normal file
3
.config/nvim/lua/native_pack_test/init.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
vim.pack.add({
|
||||
src = { "https://github.com/nvim-telescope/telescope.nvim" },
|
||||
})
|
||||
@@ -1,8 +0,0 @@
|
||||
--local wk = require("which-key")
|
||||
--require("aerial").setup({
|
||||
-- wk.add({
|
||||
-- { "{", "<cmd>AerialPrev<CR>", desc = "Jump to prev Symbol" },
|
||||
-- { "}", "<cmd>AerialNext<CR>", desc = "Jump to prev Symbol" },
|
||||
-- { "<leader>a", "<cmd>AerialToggle!<CR>", desc = "Toggle Outline" },
|
||||
-- }),
|
||||
--})
|
||||
@@ -2,3 +2,7 @@ vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead", "BufEnter" }, {
|
||||
pattern = { "*.r", "*.R" },
|
||||
command = "set ts=2 sw=2 noet",
|
||||
})
|
||||
vim.api.nvim_create_autocmd({ "BufRead", "BufEnter" }, {
|
||||
pattern = { "*.md", "*.txt" },
|
||||
command = "set wrap",
|
||||
})
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
require("plug_init.vim_init")
|
||||
require("plug_init.lazy_path")
|
||||
require("lazy").setup("plugins")
|
||||
|
||||
require("plug_init.ft_autocmds")
|
||||
require("plug_init.lsp_init")
|
||||
--require("plug_init.which_key_init")
|
||||
require("plug_init.wilder_init")
|
||||
require("plug_init.mini_init")
|
||||
require("plug_init.lazy")
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{ import = "plugins" },
|
||||
},
|
||||
checker = { enabled = true },
|
||||
})
|
||||
require("everforest").load()
|
||||
require("plug_init.ft_autocmds")
|
||||
require("plug_init.godot_editor")
|
||||
require("plug_init.mini_init")
|
||||
|
||||
--require("plug_init.lsp_init")
|
||||
--require("plug_init.which_key_init")
|
||||
-- require("plug_init.wilder_init")
|
||||
|
||||
--require("plug_init.color-picker_init")
|
||||
|
||||
|
||||
24
.config/nvim/lua/plug_init/lazy.lua
Normal file
24
.config/nvim/lua/plug_init/lazy.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
--
|
||||
-- already set in "plug_init.vim_init"
|
||||
-- vim.g.mapleader = " "
|
||||
-- vim.g.maplocalleader = "\\"
|
||||
@@ -1,12 +0,0 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
vim.fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"--filter=blob:none",
|
||||
"https://github.com/folke/lazy.nvim.git",
|
||||
"--branch=stable", -- latest stable release
|
||||
lazypath,
|
||||
})
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
@@ -9,6 +9,7 @@ require("mini.comment").setup() -- block comments etc
|
||||
-- sugar ↓↓↓↓↓↓
|
||||
require("mini.indentscope").setup() -- show indent scope
|
||||
require("mini.cursorword").setup() -- highlight identical words
|
||||
require("mini.indentscope").gen_animation.none()
|
||||
|
||||
-- complicated ↓↓↓↓↓↓
|
||||
require("mini.operators").setup()
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
vim.g.neovide_refresh_rate = 60
|
||||
vim.g.neovide_refresh_rate_idle = 5
|
||||
vim.g.neovide_no_idle = false
|
||||
vim.g.neovide_cursor_trail_size = 0.5
|
||||
vim.g.neovide_cursor_animation_length = 0.05
|
||||
vim.g.neovide_cursor_trail_size = 0.05
|
||||
vim.g.neovide_cursor_animation_length = 0.01
|
||||
vim.g.neovide_cursor_unfocused_outline_width = 0.1
|
||||
vim.g.neovide_cursor_vfx_mode = "railgun" -- pixiedust, railgun, ripple, sonicboom, torpedo, wireframe
|
||||
vim.g.neovide_cursor_vfx_particle_speed = 40.0
|
||||
vim.g.neovide_cursor_vfx_particle_phase = 1.5 -- mass of particles, only railgun
|
||||
vim.g.neovide_cursor_vfx_particle_speed = 100.0
|
||||
vim.g.neovide_cursor_vfx_particle_phase = 1.0 -- mass of particles, only railgun
|
||||
vim.g.neovide_cursor_vfx_particle_curl = 1.0 -- rotation of particles, only railgun
|
||||
vim.g.neovide_cursor_vfx_particle_lifetime = 1.0
|
||||
vim.g.neovide_cursor_vfx_particle_density = 10
|
||||
vim.g.neovide_cursor_vfx_particle_density = 7
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
vim.o.compatible = false
|
||||
vim.o.showmatch = true
|
||||
vim.o.hlsearch = true
|
||||
vim.o.ignorecase = true
|
||||
vim.o.smartcase = true
|
||||
vim.o.incsearch = false
|
||||
vim.o.tabstop = 4
|
||||
@@ -38,6 +39,7 @@ vim.g.netrw_winsize = 20
|
||||
-- is used for the preview window.
|
||||
|
||||
vim.g.mapleader = " "
|
||||
-- vim.g.maplocalleader = "\\"
|
||||
|
||||
-- move highlighted lines up and down, automatic indentation
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
|
||||
@@ -1,4 +1,17 @@
|
||||
local wilder = require("wilder")
|
||||
local gradient = {
|
||||
"#fa9aea",
|
||||
"#fc4c7c",
|
||||
"#fc8595",
|
||||
"#f59565",
|
||||
"#ebbb6b",
|
||||
"#e0e050",
|
||||
"#c9f9b9",
|
||||
"#86f6b6",
|
||||
"#57f7d7",
|
||||
"#75e5f5",
|
||||
"#4686e6",
|
||||
}
|
||||
|
||||
wilder.set_option(
|
||||
"renderer",
|
||||
|
||||
@@ -32,8 +32,8 @@ return {
|
||||
"gdscript",
|
||||
"lua",
|
||||
"php",
|
||||
"python",
|
||||
"rust",
|
||||
"python",
|
||||
"typescript",
|
||||
"vim",
|
||||
},
|
||||
@@ -46,39 +46,20 @@ return {
|
||||
ensure_installed = {
|
||||
"rust_analyzer",
|
||||
"ruff",
|
||||
"biome",
|
||||
--"quick_lint_js",
|
||||
--"eslint",
|
||||
"html",
|
||||
"cssls",
|
||||
"gdscript",
|
||||
"sqls",
|
||||
"hyprls",
|
||||
"lua_ls",
|
||||
"ast-grep",
|
||||
-- "pylyzer",
|
||||
"vimls",
|
||||
"ts_ls",
|
||||
},
|
||||
automatic_enable = { true, rust_analyzer = false },
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_create_autocmd("LspAttach", {
|
||||
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
|
||||
callback = function(ev)
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
|
||||
vim.keymap.set("n", "[d", vim.diagnostic.goto_prev)
|
||||
vim.keymap.set("n", "]d", vim.diagnostic.goto_next)
|
||||
vim.keymap.set("n", "<leader>le", vim.diagnostic.open_float)
|
||||
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts)
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
|
||||
vim.keymap.set("n", "<leader>K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<leader>f", function() vim.lsp.buf.format({ async = true }) end, opts)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
@@ -146,14 +127,14 @@ return {
|
||||
vim.keymap.set("n", "<leader>K", vim.lsp.buf.hover, opts)
|
||||
vim.keymap.set("n", "<leader>wa", vim.lsp.buf.add_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<leader>wr", vim.lsp.buf.remove_workspace_folder, opts)
|
||||
vim.keymap.set("n", "<leader>f", function() vim.lsp.buf.format({ async = true }) end, opts)
|
||||
vim.keymap.set("n", "<leader>F", function() vim.lsp.buf.format({ async = true }) end, opts)
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-lint",
|
||||
event = { "BufWritePre", "InsertLeave" },
|
||||
event = { "BufEnter", "InsertLeave" },
|
||||
lazy = true,
|
||||
opts = {
|
||||
linters_by_ft = {
|
||||
@@ -161,8 +142,8 @@ return {
|
||||
gdscript = { "gdlint" },
|
||||
gitcommit = { "commitlint" },
|
||||
lua = { "ast-grep" },
|
||||
fish = { "fish_lsp" },
|
||||
markdown = {},
|
||||
fish = { "fish_lsp" },
|
||||
sql = { "sqruff" },
|
||||
python = { "ruff" },
|
||||
r = { "r-languageserver" },
|
||||
@@ -172,7 +153,7 @@ return {
|
||||
},
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "InsertLeave" }, {
|
||||
callback = function() lint.try_lint() end,
|
||||
})
|
||||
end,
|
||||
@@ -180,15 +161,22 @@ return {
|
||||
-- supposedly faster formatter
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
lazy = true,
|
||||
event = { "BufWritePre" },
|
||||
|
||||
--keys = { "<leader>i", "F3" },
|
||||
opts = {
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
pattern = "*",
|
||||
callback = function(args) require("conform").format({ bufnr = args.buf }) end,
|
||||
}),
|
||||
event = { "BufWritePost" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>i",
|
||||
function() require("conform").format({ async = true }) end,
|
||||
desc = "Auto format file with formatter, also on F3",
|
||||
},
|
||||
{
|
||||
"F3",
|
||||
function() require("conform").format({ async = true }) end,
|
||||
mode = { "n", "i" },
|
||||
desc = "Auto format file with formatter",
|
||||
},
|
||||
},
|
||||
opts = {},
|
||||
config = {
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
rust = { "rustfmt", lsp_format = "fallback" },
|
||||
@@ -198,7 +186,6 @@ return {
|
||||
bash = { "shellharden" },
|
||||
javascript = { "biome" },
|
||||
typescript = { "biome" },
|
||||
markdown = { "prettier" },
|
||||
r = { "air" }, -- how to make air use tabs not spaces
|
||||
css = { "ast-grep" },
|
||||
html = { "ast-grep" },
|
||||
@@ -212,6 +199,10 @@ return {
|
||||
lsp_format = "fallback",
|
||||
},
|
||||
log_level = vim.log.levels.WARNING,
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
pattern = "*",
|
||||
callback = function(args) require("conform").format({ bufnr = args.buf }) end,
|
||||
}),
|
||||
function()
|
||||
require("conform").formatters.prettier = {
|
||||
inherit = true,
|
||||
@@ -222,9 +213,13 @@ return {
|
||||
command = "biome format",
|
||||
prepend_args = "--indent-width=4 --use-editorconfig=true",
|
||||
}
|
||||
require("lua").formatters.stylua = {
|
||||
require("conform").formatters.stylua = {
|
||||
prepend = "--column-width=80",
|
||||
}
|
||||
require("conform").formatters.gdformat = {
|
||||
command = "gdformat",
|
||||
prepend_args = { "--fast {%}" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
},
|
||||
@@ -235,11 +230,11 @@ return {
|
||||
event = "BufRead",
|
||||
opts = {
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
max_lines = 4, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
max_lines = 3, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 35, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = true,
|
||||
lazy = true,
|
||||
multiline_threshold = 4, -- Maximum number of lines to show for a single context
|
||||
multiline_threshold = 1, -- Maximum number of lines to show for a single context
|
||||
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = "topline", -- Line used to calculate context. Choices: 'cursor', 'topline'.
|
||||
-- Separator between context and content. Should be a single character string, like '-'.
|
||||
|
||||
@@ -17,8 +17,8 @@ return {
|
||||
always_divide_middle = false,
|
||||
globalstatus = true,
|
||||
refresh = {
|
||||
statusline = 200,
|
||||
tabline = 200,
|
||||
statusline = 100,
|
||||
tabline = 300,
|
||||
winbar = 500,
|
||||
events = {
|
||||
"WinEnter",
|
||||
|
||||
32
.config/nvim/lua/plugins/obsidian.nvim.lua
Normal file
32
.config/nvim/lua/plugins/obsidian.nvim.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
-- Plugin: obsidian-nvim/obsidian.nvim
|
||||
-- Installed via store.nvim
|
||||
|
||||
return {
|
||||
"obsidian-nvim/obsidian.nvim",
|
||||
version = "*", -- recommended, use latest release instead of latest commit
|
||||
--ft = "markdown",
|
||||
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
|
||||
-- event = {
|
||||
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
|
||||
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
|
||||
-- -- refer to `:h file-pattern` for more examples
|
||||
-- "BufReadPre path/to/my-vault/*.md",
|
||||
-- "BufNewFile path/to/my-vault/*.md",
|
||||
-- },
|
||||
event = { "BufReadPre " .. vim.fn.expand("~") .. "/Documents/Obsidian notes/**.md" },
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "personal",
|
||||
path = "~/Documents/Obsidian notes/Felix/",
|
||||
},
|
||||
-- {
|
||||
-- name = "work",
|
||||
-- path = "~/vaults/work",
|
||||
-- },
|
||||
},
|
||||
legacy_commands = false,
|
||||
conceallevel = 2,
|
||||
-- see below for full list of options 👇
|
||||
},
|
||||
}
|
||||
@@ -14,12 +14,8 @@ return {
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
"alex-popov-tech/store.nvim",
|
||||
dependencies = {
|
||||
"OXY2DEV/markview.nvim", -- optional, for pretty readme preview / help window
|
||||
},
|
||||
cmd = "Store",
|
||||
opts = {
|
||||
width = 1000,
|
||||
@@ -54,21 +50,10 @@ return {
|
||||
{ "MunifTanjim/nui.nvim", lazy = true }, -- dep of noice.nvim
|
||||
{ "rcarriga/nvim-notify", lazy = true }, -- dep of noice.nvim
|
||||
{
|
||||
"echasnovski/mini.nvim",
|
||||
"nvim-mini/mini.nvim",
|
||||
lazy = true,
|
||||
version = false,
|
||||
},
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
branch = "v3.x",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-tree/nvim-web-devicons", -- optional, but recommended
|
||||
},
|
||||
cmd = "Neotree",
|
||||
lazy = true, -- neo-tree will lazily load itself
|
||||
},
|
||||
{
|
||||
"gelguy/wilder.nvim",
|
||||
lazy = true,
|
||||
@@ -77,11 +62,18 @@ return {
|
||||
modes = { ":", "/", "?" },
|
||||
},
|
||||
},
|
||||
{ "OXY2DEV/markview.nvim", lazy = true, ft = "Markdown", cmd = "Markview", event = { "BufRead *.md" } },
|
||||
{
|
||||
"OXY2DEV/markview.nvim",
|
||||
lazy = true,
|
||||
ft = "Markdown",
|
||||
-- keys = { "<leader>M", mode = { "n" }, "<cmd>Markview toggle<cr>", desc = "Toggle Markdown render" },
|
||||
cmd = "Markview",
|
||||
event = { "BufRead *.md" },
|
||||
},
|
||||
{
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
lazy = true,
|
||||
event = { "BufRead" },
|
||||
event = { "BufReadPost" },
|
||||
opts = {
|
||||
"*",
|
||||
css = { rgb_fn = true, hsl_fn = true },
|
||||
@@ -191,4 +183,8 @@ return {
|
||||
lazy = true,
|
||||
cmd = { "Typr", "TyprStats" },
|
||||
},
|
||||
{
|
||||
"ibhagwan/fzf-lua",
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -6,8 +6,13 @@ return {
|
||||
keys = {
|
||||
{ "<leader><leader>", mode = { "n" }, "<cmd>Telescope smart_open<cr>", desc = "smart_open" },
|
||||
{ "<leader>ff", mode = { "n" }, "<cmd>Telescope find_files<cr>", desc = "Find File" },
|
||||
{ "<leader>fb", mode = { "n" }, "<cmd>Telescope buffers<cr>", desc = "Find Buffer" },
|
||||
{ "<leader>fh", mode = { "n" }, "<cmd>Telescope help_tags<cr>", desc = "Find Help" },
|
||||
{ "<leader>fs", mode = { "n" }, "<cmd>Telescope live_grep<cr>", desc = "Live Grep" },
|
||||
{ "<leader>fw", mode = { "n" }, "<cmd>Telescope grep_string<cr>", desc = "Find string under cursor" },
|
||||
{ "<leader>f", group = "Telescope" },
|
||||
{ "<leader>fd", mode = { "n" }, "<cmd>Telescope lsp_document_symbols<cr>", desc = "Find LSP Symbols" },
|
||||
{ "<leader>fr", mode = { "n" }, "<cmd>Telescope oldfiles<cr>", desc = "Open Recent File", remap = true },
|
||||
},
|
||||
cmd = { "Telescope" },
|
||||
opts = {
|
||||
@@ -58,9 +63,7 @@ return {
|
||||
branch = "0.3.x",
|
||||
lazy = true,
|
||||
-- keys = { "<leader><leader>", "<cmd>Telescope smart_open<cr>", desc = "smart open" },
|
||||
config = {
|
||||
function() require("telescope").load_extension("smart_open") end,
|
||||
},
|
||||
config = function() require("telescope").load_extension("smart_open") end,
|
||||
},
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
{ "MunifTanjim/nui.nvim", lazy = true },
|
||||
@@ -69,9 +72,7 @@ return {
|
||||
-- faster and better matching than fzf
|
||||
{
|
||||
"nvim-telescope/telescope-fzy-native.nvim",
|
||||
config = {
|
||||
function() require("telescope").load_extension("fzy_native") end,
|
||||
},
|
||||
config = function() require("telescope").load_extension("fzy_native") end,
|
||||
},
|
||||
{ "kkharji/sqlite.lua", lazy = true },
|
||||
}
|
||||
|
||||
@@ -71,18 +71,6 @@ return {
|
||||
{ "<leader>gsh", "<cmd>Gitsigns stage_hunk<cr>", desc = "Stage Hunk" },
|
||||
{ "<leader>gu", "<cmd>Gitsigns undo_stage_hunk<cr>", desc = "Undo Stage Hunk" },
|
||||
|
||||
-- lsp and debugging
|
||||
{
|
||||
"<leader>i",
|
||||
function() require("conform").format({ async = true }) end,
|
||||
desc = "Auto format file with linter(?), also on F3",
|
||||
},
|
||||
{
|
||||
"F3",
|
||||
function() require("conform").format({ async = true }) end,
|
||||
mode = "ni",
|
||||
desc = "Auto format file with formatter",
|
||||
},
|
||||
{ "<leader>le", vim.diagnostic.open_float, desc = "Open diagnostic float" },
|
||||
{ "<leader>K", desc = "Show definition" },
|
||||
-- { "<Leader>d", group = "Debugging" },
|
||||
@@ -257,6 +245,10 @@ return {
|
||||
{ "q", desc = "quit undotree" },
|
||||
{ "p", desc = "jump into undetree diff window" },
|
||||
{ "<cr>", desc = "undo to this state" },
|
||||
|
||||
-- obsidian
|
||||
{ "<leader>of", "<cmd>ObsidianFollowLink<cr>", desc = "follow Obsidian Link" },
|
||||
{ "<leader>ob", "<cmd>ObsidianBackLinks<cr>", desc = "show backlinks" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user