|
|
@ -7,13 +7,195 @@ |
|
|
|
-- ADDING A PACKAGE |
|
|
|
-- |
|
|
|
-- doom.use_package("EdenEast/nightfox.nvim", "sainnhe/sonokai") |
|
|
|
doom.use_package({ |
|
|
|
"ur4ltz/surround.nvim", |
|
|
|
config = function() |
|
|
|
require("surround").setup({mappings_style = "sandwich"}) |
|
|
|
end |
|
|
|
}) |
|
|
|
|
|
|
|
doom.use_package({ |
|
|
|
-- "easymotion/vim-easymotion", |
|
|
|
-- "farmergreg/vim-lastplace", |
|
|
|
"junegunn/vim-easy-align", |
|
|
|
"axelf4/vim-strip-trailing-whitespace", |
|
|
|
"jlanzarotta/bufexplorer", |
|
|
|
"tpope/vim-repeat", |
|
|
|
-- "tpope/vim-sensible", |
|
|
|
-- "fatih/vim-go", |
|
|
|
"ziglang/zig.vim", |
|
|
|
"ollykel/v-vim", |
|
|
|
"kana/vim-textobj-user", |
|
|
|
"kana/vim-textobj-entire", |
|
|
|
"kana/vim-textobj-line", |
|
|
|
-- "kana/vim-textobj-function", |
|
|
|
"glts/vim-textobj-comment", |
|
|
|
-- "sgur/vim-textobj-parameter", |
|
|
|
"wellle/targets.vim", |
|
|
|
"michaeljsmith/vim-indent-object", |
|
|
|
"ludovicchabant/vim-gutentags", |
|
|
|
"skywind3000/gutentags_plus", |
|
|
|
"skywind3000/asyncrun.vim", |
|
|
|
"sainnhe/gruvbox-material", |
|
|
|
"arcticicestudio/nord-vim", |
|
|
|
}) |
|
|
|
|
|
|
|
doom.use_package({ |
|
|
|
'phaazon/hop.nvim', |
|
|
|
branch = 'v2', |
|
|
|
config = function() |
|
|
|
require("hop").setup { |
|
|
|
uppercase_labels = false, |
|
|
|
multi_windows = true, |
|
|
|
} |
|
|
|
-- place this in one of your configuration file(s) |
|
|
|
-- vim.api.nvim_set_keymap('', 'f', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true })<cr>", {}) |
|
|
|
-- vim.api.nvim_set_keymap('', 'F', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true })<cr>", {}) |
|
|
|
-- vim.api.nvim_set_keymap('', 't', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.AFTER_CURSOR, current_line_only = true, hint_offset = -1 })<cr>", {}) |
|
|
|
-- vim.api.nvim_set_keymap('', 'T', "<cmd>lua require'hop'.hint_char1({ direction = require'hop.hint'.HintDirection.BEFORE_CURSOR, current_line_only = true, hint_offset = 1 })<cr>", {}) |
|
|
|
vim.api.nvim_set_keymap('n', '<Leader><Leader>s', '<cmd>HopChar1<cr>', {silent=true}) |
|
|
|
vim.api.nvim_set_keymap('n', '<Leader><Leader>d', '<cmd>HopChar2<cr>', {silent=true}) |
|
|
|
end |
|
|
|
}) |
|
|
|
|
|
|
|
-- doom.use_package({ |
|
|
|
-- "ur4ltz/surround.nvim", |
|
|
|
-- config = function() |
|
|
|
-- require("surround").setup({mappings_style = "sandwich"}) |
|
|
|
-- end |
|
|
|
-- "lervag/vimtex", |
|
|
|
-- ft={'tex'}, |
|
|
|
-- }) |
|
|
|
|
|
|
|
doom.use_package({ |
|
|
|
"navarasu/onedark.nvim", |
|
|
|
config = function() |
|
|
|
require("onedark").setup { |
|
|
|
style = 'dark', |
|
|
|
transparent = false, |
|
|
|
term_colors = true, |
|
|
|
ending_tildes = false, |
|
|
|
cmp_itemkind_reverse = false, |
|
|
|
|
|
|
|
-- toggle theme style --- |
|
|
|
toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "<leader>ts" |
|
|
|
toggle_style_list = {'dark', 'darker', 'cool', 'deep', 'warm', 'warmer', 'light'}, -- List of styles to toggle between |
|
|
|
} |
|
|
|
end |
|
|
|
}) |
|
|
|
|
|
|
|
doom.use_package({ |
|
|
|
"junegunn/fzf", |
|
|
|
"junegunn/fzf.vim", |
|
|
|
}) |
|
|
|
|
|
|
|
doom.use_package({"p00f/nvim-ts-rainbow", |
|
|
|
after = "nvim-treesitter", |
|
|
|
config = function() |
|
|
|
require("nvim-treesitter.configs").setup({ |
|
|
|
rainbow = { |
|
|
|
enable = true, |
|
|
|
-- disable = { "jsx", "cpp" }, list of languages you want to disable the plugin for |
|
|
|
extended_mode = true, -- Also highlight non-bracket delimiters like html tags, boolean or table: lang -> boolean |
|
|
|
max_file_lines = nil, -- Do not enable for files with more than n lines, int |
|
|
|
-- colors = {}, -- table of hex strings |
|
|
|
-- termcolors = {} -- table of colour name strings |
|
|
|
} |
|
|
|
}) |
|
|
|
end |
|
|
|
}) |
|
|
|
|
|
|
|
doom.use_package({ |
|
|
|
"nvim-treesitter/nvim-treesitter-textobjects", |
|
|
|
after = "nvim-treesitter", |
|
|
|
config = function() |
|
|
|
require("nvim-treesitter.configs").setup({ |
|
|
|
textobjects = { |
|
|
|
select = { |
|
|
|
enable = true, |
|
|
|
|
|
|
|
-- Automatically jump forward to textobj, similar to targets.vim |
|
|
|
lookahead = true, |
|
|
|
|
|
|
|
keymaps = { |
|
|
|
-- You can use the capture groups defined in textobjects.scm |
|
|
|
["af"] = "@function.outer", |
|
|
|
["if"] = "@function.inner", |
|
|
|
["am"] = "@class.outer", |
|
|
|
-- you can optionally set descriptions to the mappings (used in the desc parameter of nvim_buf_set_keymap |
|
|
|
["im"] = { query = "@class.inner", desc = "Select inner part of a class region" }, |
|
|
|
}, |
|
|
|
|
|
|
|
-- You can choose the select mode (default is charwise 'v') |
|
|
|
selection_modes = { |
|
|
|
['@parameter.outer'] = 'v', -- charwise |
|
|
|
['@function.outer'] = 'V', -- linewise |
|
|
|
['@class.outer'] = '<c-v>', -- blockwise |
|
|
|
}, |
|
|
|
-- If you set this to `true` (default is `false`) then any textobject is |
|
|
|
-- extended to include preceding xor succeeding whitespace. Succeeding |
|
|
|
-- whitespace has priority in order to act similarly to eg the built-in |
|
|
|
-- `ap`. |
|
|
|
include_surrounding_whitespace = true, |
|
|
|
}, |
|
|
|
swap = { |
|
|
|
enable = true, |
|
|
|
swap_next = { |
|
|
|
["<leader>a"] = "@parameter.inner", |
|
|
|
}, |
|
|
|
swap_previous = { |
|
|
|
["<leader>A"] = "@parameter.inner", |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
move = { |
|
|
|
enable = true, |
|
|
|
set_jumps = true, -- whether to set jumps in the jumplist |
|
|
|
goto_next_start = { |
|
|
|
["]]"] = "@function.outer", |
|
|
|
["]m"] = "@class.outer", |
|
|
|
}, |
|
|
|
goto_next_end = { |
|
|
|
["]["] = "@function.outer", |
|
|
|
["]M"] = "@class.outer", |
|
|
|
}, |
|
|
|
goto_previous_start = { |
|
|
|
["[["] = "@function.outer", |
|
|
|
["[m"] = "@class.outer", |
|
|
|
}, |
|
|
|
goto_previous_end = { |
|
|
|
["[]"] = "@function.outer", |
|
|
|
["[M"] = "@class.outer", |
|
|
|
}, |
|
|
|
}, |
|
|
|
lsp_interop = { |
|
|
|
enable = true, |
|
|
|
border = 'none', |
|
|
|
peek_definition_code = { |
|
|
|
["<leader>df"] = "@function.outer", |
|
|
|
["<leader>dF"] = "@class.outer", |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}) |
|
|
|
end |
|
|
|
}) |
|
|
|
|
|
|
|
vim.g.bufExplorerDisableDefaultKeyMapping=1 |
|
|
|
vim.g.NERDTreeHijackNetrw = 0 -- Add this line if you use NERDTree |
|
|
|
--vim.g.lf_replace_netrw = 1 -- Open lf when vim opens a directory |
|
|
|
doom.use_keybind( |
|
|
|
{ |
|
|
|
'<Leader>b', name='+bufexplorer', { |
|
|
|
{'e', '<cmd>BufExplorer<cr>', name = 'BufExplorer'}, |
|
|
|
{'t', '<cmd>ToggleBufExplorer<cr>', name = 'ToggleBufExplorer'}, |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
vim.cmd([[ |
|
|
|
let g:gutentags_modules = ['ctags', 'gtags_cscope'] |
|
|
|
let g:gutentags_trace = 0 |
|
|
|
let g:gutentags_project_root = ['.git', '.ccls', '.svn'] |
|
|
|
let g:gutentags_cache_dir = expand('~/.cache/tags') |
|
|
|
let g:gutentags_plus_switch = 1 |
|
|
|
]]) |
|
|
|
|
|
|
|
-- ADDING A KEYBIND |
|
|
|
-- |
|
|
|
-- doom.use_keybind({ |
|
|
@ -41,8 +223,54 @@ |
|
|
|
-- { "FileType", "javascript", function() print('This is a javascript file') end } |
|
|
|
-- }) |
|
|
|
|
|
|
|
doom.indent = 2 |
|
|
|
doom.core.treesitter.settings.show_compiler_warning_message = false |
|
|
|
doom.core.reloader.settings.reload_on_save = false |
|
|
|
doom.indent = 4 |
|
|
|
--doom.core.treesitter.settings.show_compiler_warning_message = false |
|
|
|
--doom.core.reloader.settings.reload_on_save = false |
|
|
|
|
|
|
|
--doom.langs.cc.settings.disable_lsp = true |
|
|
|
--doom.langs.cc.settings.disable_diagnostics = true |
|
|
|
--doom.langs.cc.settings.lsp_name = "ccls" |
|
|
|
doom.langs.lua.settings.disable_diagnostics = true |
|
|
|
doom.colorscheme = "onedark" |
|
|
|
--doom.colorscheme = "nord" |
|
|
|
|
|
|
|
doom.preserve_edit_pos = true |
|
|
|
|
|
|
|
function _G._sugar_folds_() |
|
|
|
return require("doom.core.functions").sugar_folds() |
|
|
|
end |
|
|
|
vim.opt.foldtext = 'v:lua._sugar_folds_()' |
|
|
|
|
|
|
|
vim.defer_fn(function() |
|
|
|
vim.opt.foldmethod="expr" |
|
|
|
vim.opt.foldexpr="nvim_treesitter#foldexpr()" |
|
|
|
end, 0) |
|
|
|
|
|
|
|
doom.features.linter.settings.null_ls_settings.on_init = function(new_client, _) |
|
|
|
new_client.offset_encoding = 'utf-32' |
|
|
|
end |
|
|
|
|
|
|
|
doom.features.dashboard.settings.header = { |
|
|
|
' ', |
|
|
|
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⣤⣤⣴⣦⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', |
|
|
|
'⠀⠀⠀⠀⠀⠀⢀⣤⣾⣿⣿⣿⣿⠿⠿⠿⠿⣿⣿⣿⣿⣶⣤⡀⠀⠀⠀⠀⠀⠀ ', |
|
|
|
'⠀⠀⠀⠀⣠⣾⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣿⣿⣶⡀⠀⠀⠀⠀ ', |
|
|
|
'⠀⠀⠀⣴⣿⣿⠟⠁⠀⠀⠀⣶⣶⣶⣶⡆⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣦⠀⠀⠀ ', |
|
|
|
'⠀⠀⣼⣿⣿⠋⠀⠀⠀⠀⠀⠛⠛⢻⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣧⠀⠀ ', |
|
|
|
'⠀⢸⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⡇⠀ ', |
|
|
|
'⠀⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀ ', |
|
|
|
'⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⡟⢹⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⣹⣿⣿⠀ ', |
|
|
|
'⠀⣿⣿⣷⠀⠀⠀⠀⠀⠀⣰⣿⣿⠏⠀⠀⢻⣿⣿⡄⠀⠀⠀⠀⠀⠀⣿⣿⡿⠀ ', |
|
|
|
'⠀⢸⣿⣿⡆⠀⠀⠀⠀⣴⣿⡿⠃⠀⠀⠀⠈⢿⣿⣷⣤⣤⡆⠀⠀⣰⣿⣿⠇⠀ ', |
|
|
|
'⠀⠀⢻⣿⣿⣄⠀⠀⠾⠿⠿⠁⠀⠀⠀⠀⠀⠘⣿⣿⡿⠿⠛⠀⣰⣿⣿⡟⠀⠀ ', |
|
|
|
'⠀⠀⠀⠻⣿⣿⣧⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⠏⠀⠀⠀ ', |
|
|
|
'⠀⠀⠀⠀⠈⠻⣿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⠟⠁⠀⠀⠀⠀ ', |
|
|
|
'⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⠀⠀ ', |
|
|
|
'⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠛⠛⠛⠛⠛⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ', |
|
|
|
} |
|
|
|
doom.features.dashboard.settings.footer = {"", "Happy hacking" } |
|
|
|
|
|
|
|
-- CTRL-Z (default) |
|
|
|
doom.disable_suspension = false |
|
|
|
|
|
|
|
-- vim: sw=2 sts=2 ts=2 expandtab |
|
|
|