add some plugin and complete config

This commit is contained in:
gameloader
2022-10-18 22:12:27 +08:00
parent 00b293c1d8
commit c7757805df
18 changed files with 225 additions and 63 deletions

View File

@ -0,0 +1,3 @@
require("bufferline").setup({
options = {},
})

View File

@ -1,4 +0,0 @@
require("bufferline").setup {
options = {
}
}

View File

@ -0,0 +1,11 @@
require("cmake-tools").setup({
cmake_command = "cmake",
cmake_build_directory = "build",
cmake_build_type = "Debug",
cmake_generate_options = { "-D", "CMAKE_EXPORT_COMPILE_COMMANDS=1" },
cmake_build_options = {},
cmake_console_size = 10, -- cmake output window height
cmake_show_console = "always", -- "always", "only_on_error"
cmake_dap_configuration = { name = "cpp", type = "codelldb", request = "launch" }, -- dap configuration, optional
cmake_dap_open_command = require("dap").repl.open, -- optional
})

View File

@ -3,5 +3,6 @@ require("code_runner").setup({
filetype = {
c = "cd $dir && gcc $fileName -o $fileNameWithoutExt -g && $dir/$fileNameWithoutExt",
cpp = "cd $dir && g++ $fileName -o $fileNameWithoutExt -g && $dir/$fileNameWithoutExt",
go = "cd $dir && go run $fileName",
},
})

View File

@ -1 +1,38 @@
local db = require('dashboard')
local db = require("dashboard")
db.custom_header = {
"",
"┳┻| ",
"┻┳| ",
"┳┻|ヘ ∧ ",
"┻┳| ● w ● )",
"┳┻|⊂ノ ",
"┻┳| ",
"",
}
db.custom_center = {
{
icon = "",
desc = "Find File ",
action = "Telescope find_files find_command=rg,--hidden,--files",
shortcut = " f",
},
{
icon = "",
desc = "Recently opened files ",
action = "Telescope oldfiles",
shortcut = "SPC f r",
},
{
icon = "",
desc = "Open Project ",
action = "Telescope Project ",
shortcut = "SPC f p",
},
{
icon = "",
desc = "File Browser ",
action = "Telescope file_browser",
shortcut = "SPC f f",
},
}

14
lua/plugin-config/hop.lua Normal file
View File

@ -0,0 +1,14 @@
require("hop").setup({})
--- place this in one of your configuration file(s)
local hop = require("hop")
local directions = require("hop.hint").HintDirection
vim.keymap.set("", "f", function()
hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = true })
end, { remap = true })
vim.keymap.set("", "F", function()
hop.hint_char1({ direction = directions.BEFORE_CURSOR, current_line_only = true })
end, { remap = true })
vim.keymap.set("", "t", function()
hop.hint_char1({ direction = directions.AFTER_CURSOR, current_line_only = true, hint_offset = 0 })
end, { remap = true })

View File

@ -0,0 +1,7 @@
require("indent_blankline").setup({
-- for example, context is off by default, use this to turn it on
show_current_context = true,
indent_blankline_use_treesitter = true,
indent_blankline_use_treesitter_scope = true,
indent_blankline_char = "¦",
})

View File

@ -36,5 +36,5 @@ require("lualine").setup({
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {},
extensions = { "quickfix" },
})

View File

@ -0,0 +1,12 @@
require("neoscroll").setup({
-- All these keys will be mapped to their corresponding default scrolling animation
mappings = { "<C-u>", "<C-d>", "<C-b>", "<C-f>", "<C-y>", "<C-e>", "zt", "zz", "zb" },
hide_cursor = true, -- Hide cursor while scrolling
stop_eof = true, -- Stop at <EOF> when scrolling downwards
respect_scrolloff = false, -- Stop scrolling when the cursor reaches the scrolloff margin of the file
cursor_scrolls_alone = true, -- The cursor will keep on scrolling even if the window cannot scroll further
easing_function = nil, -- Default easing function
pre_hook = nil, -- Function to run before the scrolling animation starts
post_hook = nil, -- Function to run after the scrolling animation ends
performance_mode = false, -- Disable "Performance Mode" on all buffers.
})

View File

@ -0,0 +1,13 @@
-- Load custom tree-sitter grammar for org filetype
require("orgmode").setup()
require("orgmode").setup_ts_grammar()
-- Tree-sitter configuration
require("nvim-treesitter.configs").setup({
-- If TS highlights are not enabled at all, or disabled via `disable` prop, highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
additional_vim_regex_highlighting = { "org" }, -- Required for spellcheck, some LaTex highlights and code block highlights that do not have ts grammar
},
ensure_installed = { "org" }, -- Or run :TSUpdate org
})

View File

@ -0,0 +1 @@
require("spectre").setup({})