The complete windows feel

This commit is contained in:
inorishio
2026-02-13 11:10:09 +01:00
parent ce4238004b
commit 9c871ccf40
32 changed files with 186 additions and 390 deletions
+19
View File
@@ -21,3 +21,22 @@ autocmd("BufWritePre", {
vim.cmd "Neoformat"
end,
})
-- fWindows
autocmd("VimLeavePre", {
group = vim.api.nvim_create_augroup('fuck_shada_temp', { clear = true }),
pattern = { '*' },
callback = function()
local status = 0
for _, f in ipairs(vim.fn.globpath(vim.fn.stdpath('data') .. '/shada', '*tmp*', false, true)) do
if vim.tbl_isempty(vim.fn.readfile(f)) then
status = status + vim.fn.delete(f)
end
end
if status ~= 0 then
vim.notify('Could not delete empty temporary ShaDa files.', vim.log.levels.ERROR)
vim.fn.getchar()
end
end,
desc = "Delete empty temp ShaDa files"
})
-173
View File
@@ -1,173 +0,0 @@
vimiopt.backup = false
vim.opt.writebackup = false
vim.opt.completeopt = "menuone,menu,noinsert,noselect,popup"
vim.opt.pumheight = 10
vim.opt.updatetime = 300
vim.opt.signcolumn = "yes"
local keyset = vim.keymap.set
function _G.check_back_space()
local col = vim.fn.col('.') - 1
return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil
end
-- Use Tab for trigger completion with characters ahead and navigate
-- NOTE: There's always a completion item selected by default, you may want to enable
-- no select by setting `"suggest.noselect": true` in your configuration file
-- NOTE: Use command ':verbose imap <tab>' to make sure Tab is not mapped by
-- other plugins before putting this into your config
local opts = {silent = true, noremap = true, expr = true, replace_keycodes = false}
keyset("i", "<TAB>", 'coc#pum#visible() ? coc#pum#next(0) : v:lua.check_back_space() ? "<TAB>" : coc#refresh()', opts)
keyset("i", "<S-TAB>", [[coc#pum#visible() ? coc#pum#prev(0) : "\<C-h>"]], opts)
-- Make <CR> to accept selected completion item or notify coc.nvim to format
-- <C-g>u breaks current undo, please make your own choice
keyset("i", "<cr>", [[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"]], opts)
-- Use <c-j> to trigger snippets
keyset("i", "<c-j>", "<Plug>(coc-snippets-expand-jump)")
-- Use <c-space> to trigger completion
keyset("i", "<c-space>", "coc#refresh()", {silent = true, expr = true})
-- Use `[g` and `]g` to navigate diagnostics
-- Use `:CocDiagnostics` to get all diagnostics of current buffer in location list
keyset("n", "[g", "<Plug>(coc-diagnostic-prev)", {silent = true})
keyset("n", "]g", "<Plug>(coc-diagnostic-next)", {silent = true})
-- GoTo code navigation
keyset("n", "gd", "<Plug>(coc-definition)", {silent = true})
keyset("n", "gy", "<Plug>(coc-type-definition)", {silent = true})
keyset("n", "gi", "<Plug>(coc-implementation)", {silent = true})
keyset("n", "gr", "<Plug>(coc-references)", {silent = true})
-- Use K to show documentation in preview window
function _G.show_docs()
local cw = vim.fn.expand('<cword>')
if vim.fn.index({'vim', 'help'}, vim.bo.filetype) >= 0 then
vim.api.nvim_command('h ' .. cw)
elseif vim.api.nvim_eval('coc#rpc#ready()') then
vim.fn.CocActionAsync('doHover')
else
vim.api.nvim_command('!' .. vim.o.keywordprg .. ' ' .. cw)
end
end
keyset("n", "K", '<CMD>lua _G.show_docs()<CR>', {silent = true})
-- Highlight the symbol and its references on a CursorHold event(cursor is idle)
vim.api.nvim_create_augroup("CocGroup", {})
vim.api.nvim_create_autocmd("CursorHold", {
group = "CocGroup",
command = "silent call CocActionAsync('highlight')",
desc = "Highlight symbol under cursor on CursorHold"
})
-- Symbol renaming
keyset("n", "<leader>rn", "<Plug>(coc-rename)", {silent = true})
-- Formatting selected code
keyset("x", "<leader>f", "<Plug>(coc-format-selected)", {silent = true})
keyset("n", "<leader>f", "<Plug>(coc-format-selected)", {silent = true})
-- Setup formatexpr specified filetype(s)
vim.api.nvim_create_autocmd("FileType", {
group = "CocGroup",
pattern = "typescript,json",
command = "setl formatexpr=CocAction('formatSelected')",
desc = "Setup formatexpr specified filetype(s)."
})
-- Apply codeAction to the selected region
-- Example: `<leader>aap` for current paragraph
local opts = {silent = true, nowait = true}
keyset("x", "<leader>a", "<Plug>(coc-codeaction-selected)", opts)
keyset("n", "<leader>a", "<Plug>(coc-codeaction-selected)", opts)
-- Remap keys for apply code actions at the cursor position.
keyset("n", "<leader>ac", "<Plug>(coc-codeaction-cursor)", opts)
-- Remap keys for apply source code actions for current file.
keyset("n", "<leader>as", "<Plug>(coc-codeaction-source)", opts)
-- Apply the most preferred quickfix action on the current line.
keyset("n", "<leader>qf", "<Plug>(coc-fix-current)", opts)
-- Remap keys for apply refactor code actions.
keyset("n", "<leader>re", "<Plug>(coc-codeaction-refactor)", { silent = true })
keyset("x", "<leader>r", "<Plug>(coc-codeaction-refactor-selected)", { silent = true })
keyset("n", "<leader>r", "<Plug>(coc-codeaction-refactor-selected)", { silent = true })
-- Run the Code Lens actions on the current line
keyset("n", "<leader>cl", "<Plug>(coc-codelens-action)", opts)
-- Map function and class text objects
-- NOTE: Requires 'textDocument.documentSymbol' support from the language server
keyset("x", "if", "<Plug>(coc-funcobj-i)", opts)
keyset("o", "if", "<Plug>(coc-funcobj-i)", opts)
keyset("x", "af", "<Plug>(coc-funcobj-a)", opts)
keyset("o", "af", "<Plug>(coc-funcobj-a)", opts)
keyset("x", "ic", "<Plug>(coc-classobj-i)", opts)
keyset("o", "ic", "<Plug>(coc-classobj-i)", opts)
keyset("x", "ac", "<Plug>(coc-classobj-a)", opts)
keyset("o", "ac", "<Plug>(coc-classobj-a)", opts)
-- Remap <C-f> and <C-b> to scroll float windows/popups
---@diagnostic disable-next-line: redefined-local
local opts = {silent = true, nowait = true, expr = true}
keyset("n", "<C-f>", 'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"', opts)
keyset("n", "<C-b>", 'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"', opts)
keyset("i", "<C-f>",
'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(1)<cr>" : "<Right>"', opts)
keyset("i", "<C-b>",
'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(0)<cr>" : "<Left>"', opts)
keyset("v", "<C-f>", 'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"', opts)
keyset("v", "<C-b>", 'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"', opts)
-- Use CTRL-S for selections ranges
-- Requires 'textDocument/selectionRange' support of language server
keyset("n", "<C-s>", "<Plug>(coc-range-select)", {silent = true})
keyset("x", "<C-s>", "<Plug>(coc-range-select)", {silent = true})
-- Add `:Format` command to format current buffer
vim.api.nvim_create_user_command("Format", "call CocAction('format')", {})
-- " Add `:Fold` command to fold current buffer
vim.api.nvim_create_user_command("Fold", "call CocAction('fold', <f-args>)", {nargs = '?'})
-- Add `:OR` command for organize imports of the current buffer
vim.api.nvim_create_user_command("OR", "call CocActionAsync('runCommand', 'editor.action.organizeImport')", {})
-- Add (Neo)Vim's native statusline support
-- NOTE: Please see `:h coc-status` for integrations with external plugins that
-- provide custom statusline: lightline.vim, vim-airline
vim.opt.statusline:prepend("%{coc#status()}%{get(b:,'coc_current_function','')}")
-- Mappings for CoCList
-- code actions and coc stuff
---@diagnostic disable-next-line: redefined-local
local opts = {silent = true, nowait = true}
-- Show all diagnostics
keyset("n", "<space>a", ":<C-u>CocList diagnostics<cr>", opts)
-- Manage extensions
keyset("n", "<space>m", ":<C-u>CocList extensions<cr>", opts)
-- Show commands
keyset("n", "<space>c", ":<C-u>CocList commands<cr>", opts)
-- Find symbol of current document
keyset("n", "<space>o", ":<C-u>CocList outline<cr>", opts)
-- Search workspace symbols
keyset("n", "<space>s", ":<C-u>CocList -I symbols<cr>", opts)
-- Do default action for next item
keyset("n", "<space>j", ":<C-u>CocNext<cr>", opts)
-- Do default action for previous item
keyset("n", "<space>k", ":<C-u>CocPrev<cr>", opts)
-- Resume latest coc list
keyset("n", "<space>p", ":<C-u>CocListResume<cr>", opts)
@@ -26,6 +26,7 @@ require("mason-lspconfig").setup {
automatic_enable = true,
ensure_installed = {
"lua_ls",
"qmlls",
"rust_analyzer",
"gopls",
},
+2 -2
View File
@@ -2,12 +2,12 @@ vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.base46_cache = vim.fn.stdpath "data" .. "/base46/"
vim.g.mapleader = " "
vim.g.gruvbox_material_background = "medium"
vim.g.coq_settings = { keymap = { recommended = false } }
vim.g.gruvbox_material_foreground = "original"
vim.g.zig_fmt_parse_errors = 0
vim.g.zig_fmt_autosave = 0
vim.api.nvim_set_hl(0, 'GitGutterAdd', { fg = '#009900', ctermfg = 2 })
vim.api.nvim_set_hl(0, 'GitGutterChange', { fg = '#bbbb00', ctermfg = 3 })
vim.api.nvim_set_hl(0, 'GitGutterDelete', { fg = '#ff2222', ctermfg = 1 })
-- vim.g.gruvbox_material_background = "medium"
-- vim.g.gruvbox_material_foreground = "original"
+19 -41
View File
@@ -1,68 +1,48 @@
local map = vim.keymap.set
-- Base nvim mappings, you need this.
map("n", "<Tab>", "<Cmd>BufferLineCycleNext<CR>")
map("n", "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>")
map({"n", "v"}, "<leader>ap", require("actions-preview").code_actions)
map("n", ";", ":", { desc = "CMD enter command mode" })
-- Move selected text up
map("v", "<C-Up>", ":m '<-2<CR>gv=gv", { desc = "Move selected text up" })
map("v", "<C-Down>", ":m '>+1<CR>gv=gv", { desc = "Move selected text down" })
map("n", "<C-a>", "ggVG", { noremap = true, silent = true })
map("n", "<C-j>", "<C-d>zz")
map("n", "<C-k>", "<C-u>zz")
map("n", "<A-->", ":bdelete<CR>")
-- map("n", "<SA-->", ":BufferRestore<CR>")
map('n', '<leader>e', function() Snacks.explorer() end)
map('n', '<leader>u', require('undotree').toggle, { noremap = true, silent = true })
map("n", "<leader>g", require("telescope.builtin").live_grep, {desc = "Telescope grep" })
map("n", "<leader>f", require("telescope.builtin").find_files, {desc = "Telescope find files" })
-- Copilot Chat buffer
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
map("i", "<A-c>", vim.cmd.CopilotChatToggle)
map("v", "<A-c>", vim.cmd.CopilotChatToggle)
-- Explorer and Undotree
map('n', '<leader>e', function() Snacks.explorer() end)
map('n', '<leader>u', require('undotree').toggle, { noremap = true, silent = true })
-- Telescope grep
map("n", "<leader>g", require("telescope.builtin").live_grep, {desc = "Telescope grep" })
map("n", "<leader>f", require("telescope.builtin").find_files, {desc = "Telescope find files" })
map("n", "<A-->", ":bdelete<CR>")
-- map("n", "<SA-->", ":BufferRestore<CR>")
map("n", "<C-a>", "ggVG", { noremap = true, silent = true })
map("n", "J", "mzJ`z")
map("n", "<C-d>", "<C-d>zz")
map("n", "<C-u>", "<C-u>zz")
map("n", "n", "nzzzv")
map("n", "N", "Nzzzv")
-- LSP Restart
map("n", "<leader>zig", "<cmd>LspRestart<cr>")
-- greatest remap ever
-- Why?
map("x", "<leader>p", [["_dP]])
-- next greatest remap ever : asbjornHaland
map({"n", "v"}, "<leader>y", [["+y]])
map("n", "<leader>Y", [["+Y]])
map({"n", "v"}, "<leader>d", "\"_d")
-- This is going to get me cancelled
map("i", "<C-c>", "<Esc>")
map("n", "<leader>mr", "<cmd>CellularAutomaton make_it_rain<CR>");
map("n", "<leader><leader>", function()
vim.cmd("so")
end)
map("n", "<A-v>", "<cmd>ChatGPT<CR>")
map("n", "<leader>fm", "<cmd>TailwindConcealToggle<CR>", { desc = "Toggle Tailwind Conceal" })
-- Terminal
-- Greatest remap
map("n", "<leader>Y", [["+Y]])
map("n", "<C-q>", function() Snacks.terminal.toggle() end, { desc = "Toggle Terminal" })
-- Gitbrowse
map("n", "<leader>gb", function() Snacks.gitbrowse.open() end )
map("n", "K", require("pretty_hover").hover)
-- Might delete later
map("n", "<leader>fm", "<cmd>TailwindConcealToggle<CR>", { desc = "Toggle Tailwind Conceal" })
map("n", "<A-v>", "<cmd>ChatGPT<CR>")
-- Notif history
map("n", "<leader>n", function()
@@ -71,5 +51,3 @@ end)
-- Actions Previewer
map({ "n", "v" }, "<leader>ap", require("actions-preview").code_actions)
map("n", "K", require("pretty_hover").hover)
+1 -3
View File
@@ -3,9 +3,8 @@ vim.opt.relativenumber = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = false
vim.opt.expandtab = true
vim.opt.smartindent = false
--vim.opt.rocks.enabled = false
vim.o.list = true
vim.opt.listchars = { tab = "··", trail = "·", nbsp = "_" }
@@ -55,5 +54,4 @@ vim.env.PATH = table.concat({ vim.fn.stdpath "data", "mason", "bin" }, sep) .. d
vim.api.nvim_set_hl( 0, "Cursor", { reverse = true })
-- vim-tpipeline
vim.g.tpipeline_restore = 1
+17 -43
View File
@@ -1,4 +1,7 @@
return {
{
require("config.snacks")
},
{
"nvim-mini/mini.nvim",
version = false,
@@ -48,23 +51,6 @@ return {
require("config.barbar")
end,
},
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
config = function ()
if vim.env.TMUX then
vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, {
callback = function()
vim.defer_fn( function()
vim.opt.laststatus = 0
end, 100)
end,
})
vim.o.laststatus = 0
end
require("config.lualine")
end,
},
{
"mawkler/modicator.nvim",
config = function()
@@ -105,7 +91,7 @@ return {
cmd = "Copilot",
event = "InsertEnter",
config = function()
require "config.copilot"
require "config.ai.copilot"
end,
},
{
@@ -116,7 +102,7 @@ return {
},
build = "make tiktoken",
config = function()
require "config.copilotchat"
require "config.ai.copilotchat"
end,
},
{
@@ -125,19 +111,13 @@ return {
require("config.dapconf")
end,
},
{
require("config.snacks")
},
{
"notken12/base46-colors",
},
{
"mason-org/mason-lspconfig.nvim",
-- opts = {},
-- dependencies = {
-- { "mason-org/mason.nvim", opts = {} },
-- "neovim/nvim-lspconfig",
-- },
opts = {},
dependencies = {
{ "mason-org/mason.nvim", opts = {} },
"neovim/nvim-lspconfig",
},
},
{
"folke/lazydev.nvim",
@@ -164,7 +144,7 @@ return {
"saghen/blink.cmp",
},
config = function()
require("config.lspconfig")
require("config.format.lspconfig")
end,
},
{
@@ -182,12 +162,6 @@ return {
{
"mfussenegger/nvim-jdtls",
},
{
"catgoose/nvim-colorizer.lua",
config = function()
require("config.colorizer")
end,
},
{
"ziglang/zig.vim",
},
@@ -201,7 +175,7 @@ return {
{
"f3fora/nvim-texlabconfig",
config = function()
require("config.texlab")
require("config.format.texlab")
end,
build = "go build",
},
@@ -220,7 +194,7 @@ return {
{
"ThePrimeagen/refactoring.nvim",
config = function()
require("config.refactoring")
require("config.format.refactoring")
end,
},
{
@@ -233,13 +207,13 @@ return {
{
"aserowy/tmux.nvim",
config = function()
require("config.tmux")
require("config.terminal.tmux")
end,
},
{
"rachartier/tiny-inline-diagnostic.nvim",
config = function ()
require("config.TID")
require("config.format.TID")
end,
},
{
@@ -261,13 +235,13 @@ return {
{
"sbdchd/neoformat",
config = function()
require("config.neoformat")
require("config.format.neoformat")
end,
},
{
"Zacharias-Brohn/zterm-navigator.nvim",
config = function()
require("config.zterm-navigator")
require("config.terminal.zterm-navigator")
end,
},
{
+29 -1
View File
@@ -1,9 +1,37 @@
return {
{
"notken12/base46-colors",
},
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
config = function ()
if vim.env.TMUX then
vim.api.nvim_create_autocmd({ "FocusGained", "ColorScheme", "VimEnter" }, {
callback = function()
vim.defer_fn( function()
vim.opt.laststatus = 0
end, 100)
end,
})
vim.o.laststatus = 0
end
require("config.theme.lualine")
end,
},
{
"catgoose/nvim-colorizer.lua",
config = function()
require("config.theme.colorizer")
end,
},
{
"olimorris/onedarkpro.nvim",
enabled = false,
priority = 1000,
config = function()
require("config.themelight")
require("config.theme.onedarkpro-light
")
end,
},
}