diff --git a/extensions.json b/extensions.json index ec54877..1a80304 100644 --- a/extensions.json +++ b/extensions.json @@ -1 +1 @@ -[{"identifier":{"id":"geequlim.godot-tools","uuid":"bbcbb8de-2baf-455f-a458-d5a6f084cebb"},"version":"1.3.1","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/geequlim.godot-tools-1.3.1-universal","scheme":"file"},"relativeLocation":"geequlim.godot-tools-1.3.1-universal","metadata":{"id":"bbcbb8de-2baf-455f-a458-d5a6f084cebb","publisherId":"aad638a3-8106-4023-80fe-66580f3e3b1c","publisherDisplayName":"geequlim","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1680358851415,"preRelease":false}},{"identifier":{"id":"rhaiscript.vscode-rhai","uuid":"a42498de-5a1f-4d59-bd71-d93e51e0a0ed"},"version":"0.6.6","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/rhaiscript.vscode-rhai-0.6.6-universal","scheme":"file"},"relativeLocation":"rhaiscript.vscode-rhai-0.6.6-universal","metadata":{"id":"a42498de-5a1f-4d59-bd71-d93e51e0a0ed","publisherId":"628c077a-8ff1-4dea-8505-7c6b295c7ea6","publisherDisplayName":"rhaiscript","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684314707040,"preRelease":false}},{"identifier":{"id":"bungcip.better-toml","uuid":"464f4ac7-af65-4aa9-9907-4ba7fa419085"},"version":"0.3.2","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/bungcip.better-toml-0.3.2-universal","scheme":"file"},"relativeLocation":"bungcip.better-toml-0.3.2-universal","metadata":{"id":"464f4ac7-af65-4aa9-9907-4ba7fa419085","publisherId":"87bfa971-0ee5-4ec2-afdb-1d26a8959fa4","publisherDisplayName":"bungcip","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684478813643,"preRelease":false}},{"identifier":{"id":"vsls-contrib.gitdoc","uuid":"7be174a5-ac74-4496-bf8b-8cc6cc60408c"},"version":"0.1.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/vsls-contrib.gitdoc-0.1.0-universal","scheme":"file"},"relativeLocation":"vsls-contrib.gitdoc-0.1.0-universal","metadata":{"id":"7be174a5-ac74-4496-bf8b-8cc6cc60408c","publisherId":"03b54342-c642-4e41-b84d-6a2222e2b060","publisherDisplayName":"vsls-contrib","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684771186531,"preRelease":false}},{"identifier":{"id":"laurenttreguier.vscode-simple-icons","uuid":"23d65a8c-fcd4-4897-86da-7fe55088e2c6"},"version":"1.16.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/laurenttreguier.vscode-simple-icons-1.16.0-universal","scheme":"file"},"relativeLocation":"laurenttreguier.vscode-simple-icons-1.16.0-universal","metadata":{"id":"23d65a8c-fcd4-4897-86da-7fe55088e2c6","publisherId":"08f24380-f487-49dd-ba4a-ea7bc7bda282","publisherDisplayName":"LaurentTreguier","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684869578706,"preRelease":false}},{"identifier":{"id":"castwide.solargraph","uuid":"349e83e2-207c-4309-a8d2-dfa43f7ee0c9"},"version":"0.24.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/castwide.solargraph-0.24.0-universal","scheme":"file"},"relativeLocation":"castwide.solargraph-0.24.0-universal","metadata":{"id":"349e83e2-207c-4309-a8d2-dfa43f7ee0c9","publisherId":"8244762e-597b-434d-b303-f780ff47b36c","publisherDisplayName":"castwide","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684905859995,"preRelease":false}},{"identifier":{"id":"shopify.ruby-lsp"},"version":"0.3.1","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/shopify.ruby-lsp-0.3.1","scheme":"file"},"relativeLocation":"shopify.ruby-lsp-0.3.1","metadata":{"installedTimestamp":1684906930324}},{"identifier":{"id":"yzane.markdown-pdf","uuid":"f015bc3c-a098-4245-8765-615e002e09ab"},"version":"1.4.4","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/yzane.markdown-pdf-1.4.4-universal","scheme":"file"},"relativeLocation":"yzane.markdown-pdf-1.4.4-universal","metadata":{"id":"f015bc3c-a098-4245-8765-615e002e09ab","publisherId":"86794f67-46a8-4137-a5a4-1415a0e41e7d","publisherDisplayName":"yzane","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1686561194091,"preRelease":false}},{"identifier":{"id":"jeanp413.open-remote-ssh","uuid":"9fc16cea-08e2-4ae5-bf75-224004d722ff"},"version":"0.0.39","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.39-universal","scheme":"file"},"relativeLocation":"jeanp413.open-remote-ssh-0.0.39-universal","metadata":{"id":"9fc16cea-08e2-4ae5-bf75-224004d722ff","publisherId":"82e59b79-acc5-4a5b-81cb-9303cbdc05cb","publisherDisplayName":"jeanp413","targetPlatform":"universal","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1686647128069,"preRelease":false}},{"identifier":{"id":"ms-azuretools.vscode-docker","uuid":"0479fc1c-3d67-49f9-b087-fb9069afe48f"},"version":"1.25.2","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/ms-azuretools.vscode-docker-1.25.2-universal","scheme":"file"},"relativeLocation":"ms-azuretools.vscode-docker-1.25.2-universal","metadata":{"id":"0479fc1c-3d67-49f9-b087-fb9069afe48f","publisherId":"52b787f2-79a9-4f32-99b4-393afe3005d3","publisherDisplayName":"ms-azuretools","targetPlatform":"universal","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1689058565146,"preRelease":false}},{"identifier":{"id":"jdinhlife.gruvbox","uuid":"c6d564c4-ca8c-45ba-abf6-c85f2d1468d8"},"version":"1.8.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/jdinhlife.gruvbox-1.8.0-universal","scheme":"file"},"relativeLocation":"jdinhlife.gruvbox-1.8.0-universal","metadata":{"id":"c6d564c4-ca8c-45ba-abf6-c85f2d1468d8","publisherId":"571210a8-f372-43c2-8b5a-018868d4ac96","publisherDisplayName":"jdinhlife","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1689674016345,"preRelease":false}},{"identifier":{"id":"vscodevim.vim","uuid":"d96e79c6-8b25-4be3-8545-0e0ecefcae03"},"version":"1.25.2","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/vscodevim.vim-1.25.2-universal","scheme":"file"},"relativeLocation":"vscodevim.vim-1.25.2-universal","metadata":{"id":"d96e79c6-8b25-4be3-8545-0e0ecefcae03","publisherId":"5d63889b-1b67-4b1f-8350-4f1dce041a26","publisherDisplayName":"vscodevim","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1689755968303,"preRelease":false}},{"identifier":{"id":"polymeilex.wgsl","uuid":"5f7eb109-3b69-42c6-b2a2-b93fa06fb18d"},"version":"0.1.16","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/polymeilex.wgsl-0.1.16-universal","scheme":"file"},"relativeLocation":"polymeilex.wgsl-0.1.16-universal","metadata":{"id":"5f7eb109-3b69-42c6-b2a2-b93fa06fb18d","publisherId":"d74e7254-1bbd-4279-ad17-0745bd092120","publisherDisplayName":"PolyMeilex","targetPlatform":"universal","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1690192165251,"preRelease":false}},{"identifier":{"id":"rust-lang.rust-analyzer","uuid":"06574cb4-e5dc-4631-8174-a543a4533621"},"version":"0.3.1599","location":{"$mid":1,"fsPath":"/home/jaroslaw/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.1599-linux-x64","path":"/home/jaroslaw/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.1599-linux-x64","scheme":"file"},"relativeLocation":"rust-lang.rust-analyzer-0.3.1599-linux-x64","metadata":{"id":"06574cb4-e5dc-4631-8174-a543a4533621","publisherId":"cb14a7a7-a188-40bd-a953-e0a20757c5dd","publisherDisplayName":"rust-lang","targetPlatform":"linux-x64","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1690192165397,"preRelease":false}}] \ No newline at end of file +[{"identifier":{"id":"geequlim.godot-tools","uuid":"bbcbb8de-2baf-455f-a458-d5a6f084cebb"},"version":"1.3.1","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/geequlim.godot-tools-1.3.1-universal","scheme":"file"},"relativeLocation":"geequlim.godot-tools-1.3.1-universal","metadata":{"id":"bbcbb8de-2baf-455f-a458-d5a6f084cebb","publisherId":"aad638a3-8106-4023-80fe-66580f3e3b1c","publisherDisplayName":"geequlim","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1680358851415,"preRelease":false}},{"identifier":{"id":"rhaiscript.vscode-rhai","uuid":"a42498de-5a1f-4d59-bd71-d93e51e0a0ed"},"version":"0.6.6","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/rhaiscript.vscode-rhai-0.6.6-universal","scheme":"file"},"relativeLocation":"rhaiscript.vscode-rhai-0.6.6-universal","metadata":{"id":"a42498de-5a1f-4d59-bd71-d93e51e0a0ed","publisherId":"628c077a-8ff1-4dea-8505-7c6b295c7ea6","publisherDisplayName":"rhaiscript","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684314707040,"preRelease":false}},{"identifier":{"id":"bungcip.better-toml","uuid":"464f4ac7-af65-4aa9-9907-4ba7fa419085"},"version":"0.3.2","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/bungcip.better-toml-0.3.2-universal","scheme":"file"},"relativeLocation":"bungcip.better-toml-0.3.2-universal","metadata":{"id":"464f4ac7-af65-4aa9-9907-4ba7fa419085","publisherId":"87bfa971-0ee5-4ec2-afdb-1d26a8959fa4","publisherDisplayName":"bungcip","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684478813643,"preRelease":false}},{"identifier":{"id":"vsls-contrib.gitdoc","uuid":"7be174a5-ac74-4496-bf8b-8cc6cc60408c"},"version":"0.1.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/vsls-contrib.gitdoc-0.1.0-universal","scheme":"file"},"relativeLocation":"vsls-contrib.gitdoc-0.1.0-universal","metadata":{"id":"7be174a5-ac74-4496-bf8b-8cc6cc60408c","publisherId":"03b54342-c642-4e41-b84d-6a2222e2b060","publisherDisplayName":"vsls-contrib","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684771186531,"preRelease":false}},{"identifier":{"id":"laurenttreguier.vscode-simple-icons","uuid":"23d65a8c-fcd4-4897-86da-7fe55088e2c6"},"version":"1.16.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/laurenttreguier.vscode-simple-icons-1.16.0-universal","scheme":"file"},"relativeLocation":"laurenttreguier.vscode-simple-icons-1.16.0-universal","metadata":{"id":"23d65a8c-fcd4-4897-86da-7fe55088e2c6","publisherId":"08f24380-f487-49dd-ba4a-ea7bc7bda282","publisherDisplayName":"LaurentTreguier","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684869578706,"preRelease":false}},{"identifier":{"id":"castwide.solargraph","uuid":"349e83e2-207c-4309-a8d2-dfa43f7ee0c9"},"version":"0.24.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/castwide.solargraph-0.24.0-universal","scheme":"file"},"relativeLocation":"castwide.solargraph-0.24.0-universal","metadata":{"id":"349e83e2-207c-4309-a8d2-dfa43f7ee0c9","publisherId":"8244762e-597b-434d-b303-f780ff47b36c","publisherDisplayName":"castwide","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1684905859995,"preRelease":false}},{"identifier":{"id":"shopify.ruby-lsp"},"version":"0.3.1","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/shopify.ruby-lsp-0.3.1","scheme":"file"},"relativeLocation":"shopify.ruby-lsp-0.3.1","metadata":{"installedTimestamp":1684906930324}},{"identifier":{"id":"yzane.markdown-pdf","uuid":"f015bc3c-a098-4245-8765-615e002e09ab"},"version":"1.4.4","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/yzane.markdown-pdf-1.4.4-universal","scheme":"file"},"relativeLocation":"yzane.markdown-pdf-1.4.4-universal","metadata":{"id":"f015bc3c-a098-4245-8765-615e002e09ab","publisherId":"86794f67-46a8-4137-a5a4-1415a0e41e7d","publisherDisplayName":"yzane","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1686561194091,"preRelease":false}},{"identifier":{"id":"jeanp413.open-remote-ssh","uuid":"9fc16cea-08e2-4ae5-bf75-224004d722ff"},"version":"0.0.39","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/jeanp413.open-remote-ssh-0.0.39-universal","scheme":"file"},"relativeLocation":"jeanp413.open-remote-ssh-0.0.39-universal","metadata":{"id":"9fc16cea-08e2-4ae5-bf75-224004d722ff","publisherId":"82e59b79-acc5-4a5b-81cb-9303cbdc05cb","publisherDisplayName":"jeanp413","targetPlatform":"universal","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1686647128069,"preRelease":false}},{"identifier":{"id":"ms-azuretools.vscode-docker","uuid":"0479fc1c-3d67-49f9-b087-fb9069afe48f"},"version":"1.25.2","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/ms-azuretools.vscode-docker-1.25.2-universal","scheme":"file"},"relativeLocation":"ms-azuretools.vscode-docker-1.25.2-universal","metadata":{"id":"0479fc1c-3d67-49f9-b087-fb9069afe48f","publisherId":"52b787f2-79a9-4f32-99b4-393afe3005d3","publisherDisplayName":"ms-azuretools","targetPlatform":"universal","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1689058565146,"preRelease":false}},{"identifier":{"id":"jdinhlife.gruvbox","uuid":"c6d564c4-ca8c-45ba-abf6-c85f2d1468d8"},"version":"1.8.0","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/jdinhlife.gruvbox-1.8.0-universal","scheme":"file"},"relativeLocation":"jdinhlife.gruvbox-1.8.0-universal","metadata":{"id":"c6d564c4-ca8c-45ba-abf6-c85f2d1468d8","publisherId":"571210a8-f372-43c2-8b5a-018868d4ac96","publisherDisplayName":"jdinhlife","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1689674016345,"preRelease":false}},{"identifier":{"id":"vscodevim.vim","uuid":"d96e79c6-8b25-4be3-8545-0e0ecefcae03"},"version":"1.25.2","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/vscodevim.vim-1.25.2-universal","scheme":"file"},"relativeLocation":"vscodevim.vim-1.25.2-universal","metadata":{"id":"d96e79c6-8b25-4be3-8545-0e0ecefcae03","publisherId":"5d63889b-1b67-4b1f-8350-4f1dce041a26","publisherDisplayName":"vscodevim","targetPlatform":"universal","updated":false,"isPreReleaseVersion":false,"installedTimestamp":1689755968303,"preRelease":false}},{"identifier":{"id":"polymeilex.wgsl","uuid":"5f7eb109-3b69-42c6-b2a2-b93fa06fb18d"},"version":"0.1.16","location":{"$mid":1,"path":"/home/jaroslaw/.vscode-oss/extensions/polymeilex.wgsl-0.1.16-universal","scheme":"file"},"relativeLocation":"polymeilex.wgsl-0.1.16-universal","metadata":{"id":"5f7eb109-3b69-42c6-b2a2-b93fa06fb18d","publisherId":"d74e7254-1bbd-4279-ad17-0745bd092120","publisherDisplayName":"PolyMeilex","targetPlatform":"universal","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1690192165251,"preRelease":false}},{"identifier":{"id":"rust-lang.rust-analyzer","uuid":"06574cb4-e5dc-4631-8174-a543a4533621"},"version":"0.3.1607","location":{"$mid":1,"fsPath":"/home/jaroslaw/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.1607-linux-x64","path":"/home/jaroslaw/.vscode-oss/extensions/rust-lang.rust-analyzer-0.3.1607-linux-x64","scheme":"file"},"relativeLocation":"rust-lang.rust-analyzer-0.3.1607-linux-x64","metadata":{"id":"06574cb4-e5dc-4631-8174-a543a4533621","publisherId":"cb14a7a7-a188-40bd-a953-e0a20757c5dd","publisherDisplayName":"rust-lang","targetPlatform":"linux-x64","isApplicationScoped":false,"updated":true,"isPreReleaseVersion":false,"installedTimestamp":1690787553002,"preRelease":false}}] \ No newline at end of file diff --git a/i3config b/i3config index d6d0441..40f35ff 100644 --- a/i3config +++ b/i3config @@ -257,7 +257,7 @@ for_window [title="Overview – Home Assistant"] floating enable for_window [title="Outlook"] floating enable for_window [title="Netflix"] floating enable for_window [title="Welcome to Prime Video"] floating enable -for_window [title="floating_window"] floating enable +for_window [title="floating_window"] floating enable bindsym $mod+Shift+minus move scratchpad bindsym $mod+minus scratchpad show diff --git a/init.lua b/init.lua index 1858f5c..4f9bd35 100644 --- a/init.lua +++ b/init.lua @@ -12,7 +12,7 @@ end vim.opt.rtp:prepend(lazypath) require("lazy").setup({ - { "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" }, + { "NeogitOrg/neogit", dependencies = "nvim-lua/plenary.nvim" }, "lewis6991/fileline.nvim", "mfussenegger/nvim-dap", { @@ -121,9 +121,9 @@ require("lazy").setup({ -- refer to the configuration section below }, }, - { "ellisonleao/glow.nvim", config = true, cmd = "Glow" }, + { "ellisonleao/glow.nvim", config = true, cmd = "Glow" }, "nvim-pack/nvim-spectre", - { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }, + { "rcarriga/nvim-dap-ui", requires = { "mfussenegger/nvim-dap" } }, { "nvim-neorg/neorg", build = ":Neorg sync-parsers", @@ -218,14 +218,14 @@ end, { TablineFileNameBlock }) local function get_terminal_bufs() return vim.tbl_filter(function(bufnr) return vim.api.nvim_buf_get_option(bufnr, "buftype") == "terminal" - and vim.api.nvim_buf_get_option(bufnr, "buflisted") + and vim.api.nvim_buf_get_option(bufnr, "buflisted") end, vim.api.nvim_list_bufs()) end local function get_non_terminal_bufs() return vim.tbl_filter(function(bufnr) return vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal" - and vim.api.nvim_buf_get_option(bufnr, "buflisted") + and vim.api.nvim_buf_get_option(bufnr, "buflisted") end, vim.api.nvim_list_bufs()) end @@ -404,11 +404,48 @@ local function open_nvim_tree(data) end vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) +local timers = {} + vim.api.nvim_create_autocmd("TermOpen", { - group = vim.api.nvim_create_augroup("HideTerminal", { clear = true }), + group = vim.api.nvim_create_augroup("TermOpenCallback", { clear = true }), pattern = "term://*", callback = function() vim.cmd("PinBuftype") + + local timer = vim.loop.new_timer() + local bufnr = vim.api.nvim_get_current_buf() + timers[bufnr] = timer + timer:start(1000, 750, function() + vim.schedule(function() + local tji = vim.api.nvim_buf_get_var(bufnr, "terminal_job_id") + local pid = vim.fn.jobpid(tji) + local result = vim.fn.system("pgrep -lP " .. pid) + local first_child = result:gmatch("([^\n]*)\n?")() + + local words_iterator = first_child:gmatch("%S+") + words_iterator() + + local words = {} + for word in words_iterator do + table.insert(words, word) + end + + local process_name = table.concat(words, " ") + if process_name ~= "" then + vim.api.nvim_buf_set_name(bufnr, process_name) + else + vim.api.nvim_buf_set_name(bufnr, "Terminal " .. bufnr) + end + end) + end) + end, +}) +vim.api.nvim_create_autocmd("TermClose", { + group = vim.api.nvim_create_augroup("TermCloseCallback", { clear = true }), + pattern = "term://*", + callback = function() + local bufnr = vim.api.nvim_get_current_buf() + timers[bufnr]:close() end, }) @@ -515,8 +552,8 @@ wk.register({ local current_buf_nr = vim.fn.bufnr() local all = vim.tbl_filter(function(bufnr) return current_buf_nr ~= bufnr - and vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal" - and vim.api.nvim_buf_get_option(bufnr, "buflisted") + and vim.api.nvim_buf_get_option(bufnr, "buftype") ~= "terminal" + and vim.api.nvim_buf_get_option(bufnr, "buflisted") end, vim.api.nvim_list_bufs()) for _, bufnr in ipairs(all) do require("bufdelete").bufdelete(bufnr, false) @@ -684,3 +721,8 @@ dap.configurations.rust = { runInTerminal = true, }, } + +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + pattern = { "*" }, + command = [[%s/\s\+$//e]], +}) diff --git a/settings.json b/settings.json index bec0e19..ad61211 100644 --- a/settings.json +++ b/settings.json @@ -5,10 +5,8 @@ "bash": { "path": "bash", "icon": "terminal-bash", - "args": [ - "--login" - ] - }, + "args": ["--login"] + } }, "editor.fontLigatures": true, "vim.handleKeys": { @@ -40,7 +38,6 @@ "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "editor.minimap.enabled": false, "editor.renderWhitespace": "all", "window.menuBarVisibility": "toggle", "workbench.startupEditor": "none", @@ -48,5 +45,8 @@ "zenMode.centerLayout": false, "editor.rulers": [ 80 - ] + ], + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + } }