From 948e1feea341fbebd646fb555636292ec0ba6277 Mon Sep 17 00:00:00 2001 From: gameloader Date: Sat, 29 Oct 2022 18:49:44 +0800 Subject: [PATCH] make some fix --- lua/basic.lua | 1 + lua/keybindings.lua | 3 ++- lua/plugin-config/coderunner.lua | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/basic.lua b/lua/basic.lua index f131ccd..4943272 100644 --- a/lua/basic.lua +++ b/lua/basic.lua @@ -24,6 +24,7 @@ M.load_default_options = function() splitbelow = true, -- force all horizontal splits to go below current window splitright = true, -- force all vertical splits to go to the right of current window swapfile = false, -- creates a swapfile + autochdir = true, -- auto change working directory termguicolors = true, -- set term gui colors (most terminals support this) timeoutlen = 1000, -- time to wait for a mapped sequence to complete (in milliseconds) title = true, -- set the title of window to the value of the titlestring diff --git a/lua/keybindings.lua b/lua/keybindings.lua index f693f2c..2a68bc2 100644 --- a/lua/keybindings.lua +++ b/lua/keybindings.lua @@ -107,7 +107,7 @@ wk.register({ b = { ":Telescope buffers", "Open buffers" }, n = { ":ls", "Buffer numbers" }, c = { ":noh", "Cancel highlight" }, - s = { ":lua require('spectre').open_file_search()", "Searching in buffer" }, + s = { ":Telescope current_buffer_fuzzy_find", "Searching in buffer" }, }, }) -- change left and right tab @@ -167,6 +167,7 @@ wk.register({ .. ":lua require'dap'.terminate()" .. ":lua require'dap.repl'.close()" .. ":lua require'dapui'.close()" + .. ":DapVirtualTextDisable" .. "o", "Stop debug", }, diff --git a/lua/plugin-config/coderunner.lua b/lua/plugin-config/coderunner.lua index 44ff1ba..ba61ff3 100644 --- a/lua/plugin-config/coderunner.lua +++ b/lua/plugin-config/coderunner.lua @@ -2,7 +2,7 @@ require("code_runner").setup({ focus = false, filetype = { c = "cd $dir && gcc $fileName -o $fileNameWithoutExt -g && $dir/$fileNameWithoutExt", - cpp = "cd $dir && g++ $fileName -o $fileNameWithoutExt -g && $dir/$fileNameWithoutExt", + cpp = "cd $dir && g++ $fileName -o $fileNameWithoutExt -g -w -std=c++11 && $dir/$fileNameWithoutExt", go = "cd $dir && go run $fileName", python = "cd $dir && python3 $fileName", },