From 216b77823608d4a08cb3e2e32f224c2501c0892e Mon Sep 17 00:00:00 2001 From: Gustavo Silva Date: Wed, 6 Sep 2023 22:31:33 +0200 Subject: [PATCH] change some settings --- lua/custom/configs/settings.lua | 13 ++++++--- lua/custom/plugins/debug.lua | 47 +++++++++++++++++---------------- lua/custom/plugins/neo-tree.lua | 12 ++++++++- lua/custom/plugins/rest.lua | 2 +- 4 files changed, 46 insertions(+), 28 deletions(-) diff --git a/lua/custom/configs/settings.lua b/lua/custom/configs/settings.lua index 04944e19..8eb77107 100644 --- a/lua/custom/configs/settings.lua +++ b/lua/custom/configs/settings.lua @@ -49,6 +49,13 @@ global.mkdp_browser = '/usr/bin/firefox' -- Fold --o.foldmethod = 'syntax' -o.foldmethod = 'expr' -o.foldexpr = 'nvim_treesitter#foldexpr()' -o.foldlevel = 1 +-- o.foldmethod = 'expr' +-- o.foldexpr = 'nvim_treesitter#foldexpr()' +-- o.foldlevel = 1 +-- o.foldnestmax = 1 +-- o.nofoldenable = false +opt.foldmethod = 'indent' +opt.foldenable = false +opt.foldlevel = 99 +global.markdown_folding = 1 + diff --git a/lua/custom/plugins/debug.lua b/lua/custom/plugins/debug.lua index 49a2f3b7..c9b9a6b1 100644 --- a/lua/custom/plugins/debug.lua +++ b/lua/custom/plugins/debug.lua @@ -66,27 +66,28 @@ return { -- Dap UI setup -- For more information, see |:help nvim-dap-ui| - dapui.setup { - -- Set icons to characters that are more likely to work in every terminal. - -- Feel free to remove or use ones that you like more! :) - -- Don't feel like these are good choices. - icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, - controls = { - icons = { - pause = '⏸', - play = '▶', - step_into = '⏎', - step_over = '⏭', - step_out = '⏮', - step_back = 'b', - run_last = '▶▶', - terminate = '⏹', - disconnect = "⏏", - }, - }, - } + dapui.setup() + -- dapui.setup { + -- -- Set icons to characters that are more likely to work in every terminal. + -- -- Feel free to remove or use ones that you like more! :) + -- -- Don't feel like these are good choices. + -- icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, + -- controls = { + -- icons = { + -- pause = '⏸', + -- play = '▶', + -- step_into = '⏎', + -- step_over = '⏭', + -- step_out = '⏮', + -- step_back = 'b', + -- run_last = '▶▶', + -- terminate = '⏹', + -- disconnect = "⏏", + -- }, + -- }, + -- } - require('nvim-dap-virtual-text').setup() + -- require('nvim-dap-virtual-text').setup() require('mason-nvim-dap').setup { -- Makes a best effort to setup the various debuggers with -- reasonable debug configurations @@ -119,9 +120,9 @@ return { end, { desc = 'dap breakpoint condition' }) -- toggle to see last session result. Without this ,you can't see session output in case of unhandled exception. - vim.keymap.set("n", "", dapui.toggle) + vim.keymap.set("n", "tt", dapui.toggle) dap.listeners.after.event_initialized['dapui_config'] = dapui.open - dap.listeners.before.event_terminated['dapui_config'] = dapui.close - dap.listeners.before.event_exited['dapui_config'] = dapui.close + -- dap.listeners.before.event_terminated['dapui_config'] = dapui.close + -- dap.listeners.before.event_exited['dapui_config'] = dapui.close end, } diff --git a/lua/custom/plugins/neo-tree.lua b/lua/custom/plugins/neo-tree.lua index 4ff87ad7..4879b34d 100644 --- a/lua/custom/plugins/neo-tree.lua +++ b/lua/custom/plugins/neo-tree.lua @@ -8,6 +8,16 @@ return { }, config = function() require('neo-tree').setup { + close_if_last_window = true, + event_handlers = { + { + event = "file_opened", + handler = function() + require("neo-tree.command").execute({ action = "close" }) + end + + }, + }, window = { position = "right", popup = { @@ -85,7 +95,7 @@ return { }, }, } - vim.keymap.set("n", "pw" , "Neotree toggle") + vim.keymap.set("n", "pw", "Neotree toggle") vim.keymap.set("n", "cw", "Neotree focus") end, } diff --git a/lua/custom/plugins/rest.lua b/lua/custom/plugins/rest.lua index 6b7bc16d..fd2debf9 100644 --- a/lua/custom/plugins/rest.lua +++ b/lua/custom/plugins/rest.lua @@ -10,7 +10,7 @@ return { -- Open request results in a horizontal split result_split_horizontal = false, -- Skip SSL verification, useful for unknown certificates - skip_ssl_verification = false, + skip_ssl_verification = true, encode_url = false, -- Highlight request on run highlight = {