Skip to content

Commit

Permalink
Fix edgy, spectre
Browse files Browse the repository at this point in the history
  • Loading branch information
crivotz committed Feb 19, 2024
1 parent 030b95a commit 7dfa5e0
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 87 deletions.
28 changes: 13 additions & 15 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"feline.nvim": { "branch": "main", "commit": "6cfbe0608d2552a7d947c6f521670b10379fbe42" },
"flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
"formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" },
"friendly-snippets": { "branch": "main", "commit": "5cc1f45c6aac699ad008fb85f6ae03236062667d" },
"friendly-snippets": { "branch": "main", "commit": "dbd45e9ba76d535e4cba88afa1b7aa43bb765336" },
"gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
"hbac.nvim": { "branch": "main", "commit": "e2e8333aa56ef43a577ac3a2a2e87bdf2f0d4cbb" },
"hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" },
Expand All @@ -31,46 +31,45 @@
"neo-tree-diagnostics.nvim": { "branch": "main", "commit": "483019d251c31acd14102bc279f938f98d9a3de6" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3941c57ec85d7bdb44fa53fd858fd80f159018f" },
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
"nui.nvim": { "branch": "main", "commit": "af7dfee12fbf51d12cfc6ee386fa54f7a5a573c8" },
"nui.nvim": { "branch": "main", "commit": "c3c7fd618dcb5a89e443a2e1033e7d11fdb0596b" },
"numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" },
"nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" },
"nvim-autopairs": { "branch": "master", "commit": "2e8a10c5fc0dcaf8296a5f1a7077efcd37065cc8" },
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-dap": { "branch": "master", "commit": "0406598c8079c5441b96ff4a2f245acc085ebcd6" },
"nvim-dap-ui": { "branch": "master", "commit": "d845ebd798ad1cf30aa4abd4c4eff795cdcfdd4f" },
"nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" },
"nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" },
"nvim-dap-virtual-text": { "branch": "master", "commit": "d4542ac257d3c7ee4131350db6179ae6340ce40b" },
"nvim-hlslens": { "branch": "main", "commit": "8ffc64bb6b624612cf762982b92633f283f7a715" },
"nvim-hlslens": { "branch": "main", "commit": "e4c811a401b06f86a7bb042b1d64a5cba21729a9" },
"nvim-lspconfig": { "branch": "master", "commit": "d1bab4cf4b69e49d6058028fd933d8ef5e74e680" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
"nvim-notify": { "branch": "master", "commit": "7138c86b28de61b6866c8cae60289136f0d539fa" },
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
"nvim-spectre": { "branch": "master", "commit": "6a0785ef64c839d935a2f92e20988e962fb6537e" },
"nvim-toggleterm.lua": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
"nvim-treesitter": { "branch": "master", "commit": "581e87ba4e509a50689fcdd538e5f9388845eb78" },
"nvim-ufo": { "branch": "main", "commit": "b0741a647efd98d9abb6cb653e056d24a07e4581" },
"nvim-web-devicons": { "branch": "master", "commit": "7f30f2da3c3641841ceb0e2c150281f624445e8f" },
"oil-vcs-status": { "branch": "main", "commit": "f9c3681bd97c10b04744995b8a869885552b8294" },
"nvim-treesitter": { "branch": "master", "commit": "b3e53e94232d2bc6d70516efbd932bcce3ba8e1e" },
"nvim-ufo": { "branch": "main", "commit": "553d8a9c611caa9f020556d4a26b760698e5b81b" },
"nvim-web-devicons": { "branch": "master", "commit": "14ac5887110b06b89a96881d534230dac3ed134d" },
"oil-vcs-status": { "branch": "main", "commit": "f9c83ec0df05aa06c1cb1bd3b004715fd21f799b" },
"oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" },
"plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" },
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
"promise-async": { "branch": "main", "commit": "94f6f03c6c1e2aab551aacdf0c1e597a7269abb6" },
"ror.nvim": { "branch": "main", "commit": "1ed227c88a45b066b7f7e32aa827dd3877f4d053" },
"statuscol.nvim": { "branch": "main", "commit": "eca428c8df8549fe7a480dd0da0ccc1634f16a4b" },
"suda.vim": { "branch": "master", "commit": "8b0fc3711760195aba104e2d190cff9af8267052" },
"symbols-outline.nvim": { "branch": "master", "commit": "564ee65dfc9024bdde73a6621820866987cbb256" },
"telescope-dap.nvim": { "branch": "master", "commit": "8c88d9716c91eaef1cdea13cb9390d8ef447dbfe" },
"telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" },
"telescope-live-grep-args.nvim": { "branch": "master", "commit": "731a046da7dd3adff9de871a42f9b7fb85f60f47" },
"telescope-repo.nvim": { "branch": "master", "commit": "e17462610fb936bc8a8cc12a249c3252156dd6f7" },
"telescope.nvim": { "branch": "master", "commit": "45d61cc8da213e4052cf698653692b6a4c961760" },
"telescope.nvim": { "branch": "master", "commit": "b744cf59752aaa01561afb4223006de26f3836fd" },
"todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
"tokyonight.nvim": { "branch": "main", "commit": "610179f7f12db3d08540b6cc61434db2eaecbcff" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
"twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
"vim-abolish": { "branch": "master", "commit": "dcbfe065297d31823561ba787f51056c147aa682" },
"vim-bundler": { "branch": "master", "commit": "c261509e78fc8dc55ad1fcf3cd7cdde49f35435c" },
"vim-capslock": { "branch": "master", "commit": "2bd1d47d35ac489b150d284141b6dce743a307f5" },
"vim-dispatch": { "branch": "master", "commit": "b84d00f11567abfcfec82a6838c7d41dfa49a447" },
"vim-dispatch": { "branch": "master", "commit": "4c695bc052cad2ae6b980aebbe48d046466e27ae" },
"vim-endwise": { "branch": "master", "commit": "3719ffddb5e42bf67b55b2183d7a6fb8d3e5a2b8" },
"vim-gutentags": { "branch": "master", "commit": "aa47c5e29c37c52176c44e61c780032dfacef3dd" },
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
Expand All @@ -81,7 +80,6 @@
"vim-sandwich": { "branch": "master", "commit": "2ce54d26564e66a675685c8a3331388b2747a26b" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
"vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" },
"vim-tpipeline": { "branch": "master", "commit": "86be2d4d7719db34d651df4690ab5f49274c646a" },
"vim-vsnip": { "branch": "master", "commit": "02a8e79295c9733434aab4e0e2b8c4b7cea9f3a9" },
"vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
Expand Down
48 changes: 28 additions & 20 deletions lua/config/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ return {
event = 'VeryLazy',
},
{
"windwp/nvim-spectre",
"nvim-pack/nvim-spectre",
event = 'VeryLazy',
},
{
Expand All @@ -327,15 +327,25 @@ return {
},
{
"folke/edgy.nvim",
event = "VeryLazy",
event = "BufReadPost",
init = function()
vim.opt.laststatus = 3
vim.opt.splitkeep = "screen"
end,
opts = {
fix_win_height = vim.fn.has "nvim-0.10.0" == 0,
options = {
left = { size = 40 },
bottom = { size = 10 },
right = { size = 40 },
top = { size = 10 },
},
bottom = {
{
ft = "spectre_panel",
title = "SPECTRE",
size = { height = 0.4 },
},
{
ft = "toggleterm",
title = "TERMINAL",
Expand All @@ -344,9 +354,21 @@ return {
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{ ft = "spectre_panel", title = "SPECTRE", size = { height = 0.4 } },
{ ft = "Trouble", title = "TROUBLE" },
{
ft = "Trouble",
title = "TROUBLE",
filter = function(buf, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{ ft = "qf", title = "QUICKFIX" },
{
ft = "noice",
size = { height = 0.4 },
filter = function(buf, win)
return vim.api.nvim_win_get_config(win).relative == ""
end,
},
{
ft = "help",
size = { height = 20 },
Expand Down Expand Up @@ -391,24 +413,10 @@ return {
pinned = true,
open = "Neotree position=right diagnostics",
},
{
title = " OUTLINE",
ft = "Outline",
pinned = true,
open = "SymbolsOutline",
},
"neo-tree",
},
},
},
{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
opts = {
position = "right",
},
},
{
"folke/flash.nvim",
event = "VeryLazy",
Expand Down Expand Up @@ -517,12 +525,12 @@ return {
config = function ()
require("hbac").setup({
autoclose = true, -- set autoclose to false if you want to close manually
threshold = 10, -- hbac will start closing unedited buffers once that number is reached
threshold = 5, -- hbac will start closing unedited buffers once that number is reached
close_command = function(bufnr)
vim.api.nvim_buf_delete(bufnr, {})
echo "󰃢 Some cleaning!"
end,
close_buffers_with_windows = false, -- hbac will close buffers with associated windows if this option is `true`
close_buffers_with_windows = false, -- hbac will close buffers with associated windows if this option is `true`
})
end
},
Expand Down
131 changes: 79 additions & 52 deletions lua/config/settings.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
local opt = vim.opt

opt.sidescrolloff = 8 -- Columns of context
-- Global
vim.g.autoformat = true
vim.opt.fillchars = {
fold = " ",
foldopen = "",
Expand All @@ -14,58 +18,74 @@ vim.opt.listchars = {
extends = "",eol = "",
nbsp = "",
}
vim.o.foldnestmax = 4
vim.o.foldlevel = 1
vim.o.foldcolumn = "1"
vim.o.foldexpr = "nvim_treesitter#foldexpr()"
vim.o.foldmethod = "expr"
vim.o.foldlevelstart = 99
vim.o.foldenable = true
-- vim.opt.showtabline = 2
vim.opt.mouse = 'a'
vim.opt.backupcopy = 'yes'
vim.opt.undolevels = 1000
vim.opt.shortmess:append { c = true, S = true }
vim.opt.showmode = false
vim.opt.hidden = true
vim.opt.splitright = true
vim.opt.splitbelow = true
vim.opt.wrapscan = true
vim.opt.backup = false
vim.opt.writebackup = false
vim.opt.showcmd = true
vim.opt.showmatch = true
vim.opt.ignorecase = true
vim.opt.hlsearch = true
vim.opt.smartcase = true
vim.opt.errorbells = false
vim.opt.joinspaces = false
vim.opt.title = true
vim.opt.encoding = 'UTF-8'
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
vim.opt.clipboard = 'unnamedplus'
vim.opt.laststatus = 3
vim.opt.timeoutlen = 500
if vim.fn.has("nvim-0.9.0") == 1 then
vim.opt.splitkeep = 'screen'
end
-- Buffer
vim.opt.fileformat = 'unix'
vim.opt.tabstop = 2
vim.opt.spelllang = 'it'
vim.opt.softtabstop = 2
vim.opt.swapfile = false
vim.opt.undofile = false
vim.opt.smartindent = true
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
-- Window
vim.opt.number = true
vim.opt.colorcolumn = "+1"
vim.opt.list = true
vim.opt.signcolumn = 'yes:1'
vim.opt.relativenumber = false
vim.opt.cursorline = true
opt.autowrite = true -- Enable auto write
opt.foldnestmax = 4
opt.foldlevel = 1
opt.foldcolumn = "1"
opt.foldexpr = "nvim_treesitter#foldexpr()"
opt.foldmethod = "expr"
opt.foldlevelstart = 99
opt.foldenable = true
-- opt.showtabline = 2
opt.mouse = 'a'
opt.backupcopy = 'yes'
opt.undolevels = 10000
opt.shortmess:append({ W = true, I = true, c = true, C = true })
-- opt.shortmess:append { c = true, S = true }
opt.showmode = false
opt.hidden = true
opt.splitright = true
opt.splitbelow = true
opt.wrapscan = true
opt.backup = false
opt.writebackup = false
opt.showcmd = true
opt.showmatch = true
opt.ignorecase = true
opt.hlsearch = true
opt.smartcase = true
opt.errorbells = false
opt.joinspaces = false
opt.title = true
opt.encoding = 'UTF-8'
opt.completeopt = { 'menu', 'menuone', 'noselect' }
opt.clipboard = 'unnamedplus'
opt.laststatus = 3
opt.timeoutlen = 500
opt.splitkeep = 'screen'
opt.termguicolors = true -- True color support
opt.timeoutlen = 300
opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.virtualedit = "block" -- Allow cursor to move where there is no text in visual block mode
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
opt.fileformat = 'unix'
opt.tabstop = 2
opt.spelllang = 'it'
opt.softtabstop = 2
opt.swapfile = false
opt.undofile = false
opt.smartindent = true
opt.expandtab = true
opt.shiftwidth = 2
opt.number = true
opt.colorcolumn = "+1"
opt.list = true
opt.signcolumn = 'yes:1'
opt.relativenumber = false
opt.cursorline = true
opt.conceallevel = 2 -- Hide * markup for bold and italic, but not markers with substitutions
opt.confirm = true -- Confirm to save changes before exiting modified buffer
opt.formatoptions = "jcroqlnt" -- tcqj
opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"
opt.inccommand = "nosplit" -- preview incremental substitute
opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp", "folds" }
opt.shiftround = true -- Round indent

vim.api.nvim_create_autocmd("BufReadPost", {
callback = function()
Expand All @@ -81,3 +101,10 @@ vim.api.nvim_create_autocmd("TextYankPost", {
vim.highlight.on_yank()
end,
})
--
-- Fix markdown indentation settings
vim.g.markdown_recommended_style = 0

if vim.fn.has("nvim-0.10") == 1 then
opt.smoothscroll = true
end

0 comments on commit 7dfa5e0

Please sign in to comment.