diff options
| author | Aotrix <[email protected]> | 2025-02-23 03:27:58 +0100 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2025-02-23 03:27:58 +0100 |
| commit | 827193de75ecd7dd8da83272aafd036e12d9a573 (patch) | |
| tree | dfc217f21cdad93df7cdc15eb43509dcaf0ab60b /lua | |
| parent | edf2220385b054af2343402b0c268d2608a96b5b (diff) | |
refactored config
Diffstat (limited to 'lua')
25 files changed, 231 insertions, 427 deletions
diff --git a/lua/telescope/multigrep.lua b/lua/aotrix/multigrep.lua index 749102e..749102e 100644 --- a/lua/telescope/multigrep.lua +++ b/lua/aotrix/multigrep.lua diff --git a/lua/aotrix/plugins/duskfox.lua b/lua/aotrix/plugins/duskfox.lua new file mode 100644 index 0000000..ac59521 --- /dev/null +++ b/lua/aotrix/plugins/duskfox.lua @@ -0,0 +1,12 @@ +return { + "EdenEast/nightfox.nvim", + config = function() + local colorscheme = "duskfox" + local ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) + vim.o.background = "dark" -- or "light" for light mode + if not ok then + vim.notify("colorscheme " .. colorscheme .. " not found!") + return + end + end +} diff --git a/lua/aotrix/plugins/harpoon.lua b/lua/aotrix/plugins/harpoon.lua new file mode 100644 index 0000000..c016b32 --- /dev/null +++ b/lua/aotrix/plugins/harpoon.lua @@ -0,0 +1,12 @@ +return { + 'ThePrimeagen/harpoon', + dependencies = {'nvim-lua/plenary.nvim'}, + config = function() + vim.keymap.set("n", "<leader>a", function() require("harpoon.mark").add_file() end) + vim.keymap.set("n", "<leader>hv", function() require("harpoon.ui").toggle_quick_menu() end) + vim.keymap.set("n", "<C-t>", function() require("harpoon.ui").nav_file(1) end) + vim.keymap.set("n", "<C-h>", function() require("harpoon.ui").nav_file(2) end) + vim.keymap.set("n", "<C-m>", function() require("harpoon.ui").nav_file(3) end) + vim.keymap.set("n", "<C-l>", function() require("harpoon.ui").nav_file(4) end) + end +} diff --git a/lua/aotrix/plugins/lsp.lua b/lua/aotrix/plugins/lsp.lua new file mode 100644 index 0000000..625618f --- /dev/null +++ b/lua/aotrix/plugins/lsp.lua @@ -0,0 +1,6 @@ +return { + "neovim/nvim-lspconfig", + config = function() + require('lspconfig').clangd.setup({}) + end, +} diff --git a/lua/aotrix/plugins/nvim_dap.lua b/lua/aotrix/plugins/nvim_dap.lua new file mode 100644 index 0000000..19ab17e --- /dev/null +++ b/lua/aotrix/plugins/nvim_dap.lua @@ -0,0 +1,51 @@ +return { + 'mfussenegger/nvim-dap', + dependencies = { + 'rcarriga/nvim-dap-ui', + 'theHamsta/nvim-dap-virtual-text', + 'nvim-neotest/nvim-nio', + 'williamboman/mason.nvim', + }, + + config = function() + local dap = require("dap") + local ui = require("dapui") + + require("dapui").setup() + require("nvim-dap-virtual-text").setup() + require("mason").setup() + + dap.adapters.codelldb = { + type = "executable", + command = "codelldb", -- or if not in $PATH: "/absolute/path/to/codelldb" + } + + dap.configurations.cpp = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + }, + } + + dap.listeners.before.attach.dapui_config = function() + ui.open() + end + dap.listeners.before.launch.dapui_config = function() + ui.open() + end + dap.listeners.before.event_terminated.dapui_config = function() + ui.close() + end + dap.listeners.before.event_exited.dapui_config = function() + ui.close() + end + + end, +} + diff --git a/lua/aotrix/plugins/statusline.lua b/lua/aotrix/plugins/statusline.lua new file mode 100644 index 0000000..3563a98 --- /dev/null +++ b/lua/aotrix/plugins/statusline.lua @@ -0,0 +1,40 @@ +return { + 'nvim-lualine/lualine.nvim', + config = function() + require('lualine').setup({ + options = { + icons_enabled = false, + theme = 'material', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} + }) + end +} diff --git a/lua/aotrix/plugins/telescope.lua b/lua/aotrix/plugins/telescope.lua new file mode 100644 index 0000000..780fde5 --- /dev/null +++ b/lua/aotrix/plugins/telescope.lua @@ -0,0 +1,41 @@ +return { + 'nvim-telescope/telescope.nvim', tag = '0.1.5', + -- or , branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope-live-grep-args.nvim', + 'nvim-telescope/telescope-file-browser.nvim', + {'nvim-telescope/telescope-fzf-native.nvim', build = 'make'}, + }, + + config = function() + require('telescope').load_extension('fzf') + local actions = require("telescope.actions") + require("telescope").setup({ + defaults = { + -- Default configuration for telescope goes here: + -- config_key = value, + mappings = { + i = { + -- map actions.which_key to <C-h> (default: <C-/>) + -- actions.which_key shows the mappings for your picker, + -- e.g. git_{create, delete, ...}_branch for the git_branches picker + ["<C-j>"] = actions.move_selection_next, + ["<C-k>"] = actions.move_selection_previous, + ["<C-n>"] = actions.preview_scrolling_down, + ["<C-p>"] = actions.preview_scrolling_up, + ["<esc>"] = actions.close, + } + } + }, + extensions = { + fzf = {} + }, + }) + + vim.keymap.set("n", "<leader>pv", function() require("telescope").extensions.file_browser.file_browser() end) + vim.keymap.set("n", "<leader>pf", function() require("telescope.builtin").find_files() end) + + require('aotrix.multigrep').setup() + end +} diff --git a/lua/aotrix/plugins/transparent.lua b/lua/aotrix/plugins/transparent.lua new file mode 100644 index 0000000..f4e2e45 --- /dev/null +++ b/lua/aotrix/plugins/transparent.lua @@ -0,0 +1,16 @@ +return { + "xiyaowong/transparent.nvim", + config = function() + require("transparent").setup({ + extra_groups = { -- table/string: additional groups that should be cleared + -- In particular, when you set it to 'all', that means all available groups + -- "NormalFloat", + -- "FloatBorder", + -- "TelescopeBorder", + -- "TelescopeNormal", + -- "TelescopeSelection", + -- "TelescopeSelectionCaret" + }, + }) + end +} diff --git a/lua/aotrix/plugins/treesitter.lua b/lua/aotrix/plugins/treesitter.lua new file mode 100644 index 0000000..09dc61c --- /dev/null +++ b/lua/aotrix/plugins/treesitter.lua @@ -0,0 +1,47 @@ +return { + "nvim-treesitter/nvim-treesitter", + config = function() + require('nvim-treesitter.configs').setup({ + -- A list of parser names, or "all" (the five listed parsers should always be installed) + ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc", "python"}, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + + -- List of parsers to ignore installing (or "all") + ignore_install = { "html" }, + + ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) + -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! + + highlight = { + enable = true, + + -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to + -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is + -- the name of the parser) + -- list of language that will be disabled + -- disable = { "c", "rust" }, + disable = { "cpp" }, + -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files + -- disable = function(lang, buf) + -- local max_filesize = 100 * 1024 -- 100 KB + -- local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) + -- if ok and stats and stats.size > max_filesize then + -- return true + -- end + -- end, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, + }) + end +} diff --git a/lua/nvim_settings/remap.lua b/lua/aotrix/remap.lua index fd4bdfd..cb70a7b 100644 --- a/lua/nvim_settings/remap.lua +++ b/lua/aotrix/remap.lua @@ -14,24 +14,13 @@ vim.keymap.set("x", "<leader>p", [["_dP]]) vim.keymap.set({"n", "v"}, "<leader>y", [["+y]]) vim.keymap.set("n", "<leader>Y", [["+Y]]) -vim.keymap.set("n", "<leader>pv", function() require("telescope").extensions.file_browser.file_browser() end) -vim.keymap.set("n", "<leader>pf", function() require("telescope.builtin").find_files() end) -vim.keymap.set("n", "<leader>s", function() require("telescope.builtin").treesitter() end) - -vim.keymap.set("n", "<leader>a", function() require("harpoon.mark").add_file() end) -vim.keymap.set("n", "<leader>hv", function() require("harpoon.ui").toggle_quick_menu() end) -vim.keymap.set("n", "<C-t>", function() require("harpoon.ui").nav_file(1) end) -vim.keymap.set("n", "<C-h>", function() require("harpoon.ui").nav_file(2) end) -vim.keymap.set("n", "<C-m>", function() require("harpoon.ui").nav_file(3) end) -vim.keymap.set("n", "<C-l>", function() require("harpoon.ui").nav_file(4) end) - -- GoTo code navigation -vim.keymap.set("n", "gD", "<Plug>(coc-declaration)", {silent = true}) -vim.keymap.set("n", "gd", "<Plug>(coc-definition)", {silent = true}) -vim.keymap.set("n", "gr", "<CMD>Telescope coc references<CR>", {silent = true}) -vim.keymap.set("n", "gy", "<Plug>(coc-type-definition)", {silent = true}) -vim.keymap.set("n", "gi", "<Plug>(coc-implementation)", {silent = true}) -vim.keymap.set("n", "K", '<CMD>lua _G.show_docs()<CR>', {silent = true}) +-- vim.keymap.set("n", "gD", "<Plug>(coc-declaration)", {silent = true}) +-- vim.keymap.set("n", "gd", "<Plug>(coc-definition)", {silent = true}) +-- vim.keymap.set("n", "gr", "<CMD>Telescope coc references<CR>", {silent = true}) +-- vim.keymap.set("n", "gy", "<Plug>(coc-type-definition)", {silent = true}) +-- vim.keymap.set("n", "gi", "<Plug>(coc-implementation)", {silent = true}) +-- vim.keymap.set("n", "K", '<CMD>lua _G.show_docs()<CR>', {silent = true}) -- Remove <C-c> because it is not fast enough vim.keymap.set({'n', 'i', 'v'}, '<C-c>', '<nop>') diff --git a/lua/nvim_settings/set.lua b/lua/aotrix/set.lua index e524c58..2c71437 100644 --- a/lua/nvim_settings/set.lua +++ b/lua/aotrix/set.lua @@ -33,5 +33,3 @@ vim.opt.signcolumn = "yes" vim.opt.isfname:append("@-@") vim.opt.updatetime = 50 - --- vim.opt.colorcolumn = "80" diff --git a/lua/autocomplete/autocomplete.lua b/lua/autocomplete/autocomplete.lua deleted file mode 100644 index 1e2687b..0000000 --- a/lua/autocomplete/autocomplete.lua +++ /dev/null @@ -1,169 +0,0 @@ -local keyset = vim.keymap.set --- Autocomplete -function _G.check_back_space() - local col = vim.fn.col('.') - 1 - return col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') ~= nil -end - --- Use Tab for trigger completion with characters ahead and navigate --- NOTE: There's always a completion item selected by default, you may want to enable --- no select by setting `"suggest.noselect": true` in your configuration file --- NOTE: Use command ':verbose imap <tab>' to make sure Tab is not mapped by --- other plugins before putting this into your config -local opts = {silent = true, noremap = true, expr = true, replace_keycodes = false} -keyset("i", "<c-j>", 'coc#pum#visible() ? coc#pum#next(1) : v:lua.check_back_space() ? "<C-J>" : coc#refresh()', opts) -keyset("i", "<c-k>", [[coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"]], opts) -vim.opt.pumheight = 12 - --- Make <CR> to accept selected completion item or notify coc.nvim to format --- <C-g>u breaks current undo, please make your own choice -keyset("i", "<cr>", [[coc#pum#visible() ? coc#pum#confirm() : "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"]], opts) - --- keyset("i", "<c-j>", "<Plug>(coc-snippets-expand-jump)") --- keyset("i", "<c-j>", "<Plug>(coc-snippets-expand-jump)") --- Use <c-space> to trigger completion -vim.g.coc_snippet_next = "<c-n>" -vim.g.coc_snippet_prev = "<c-p>" -keyset("i", "<c-space>", "coc#refresh()", {silent = true, expr = true}) - --- Use `[g` and `]g` to navigate diagnostics --- Use `:CocDiagnostics` to get all diagnostics of current buffer in location list -keyset("n", "[g", "<Plug>(coc-diagnostic-prev)", {silent = true}) -keyset("n", "]g", "<Plug>(coc-diagnostic-next)", {silent = true}) - - - --- Use K to show documentation in preview window -function _G.show_docs() - local cw = vim.fn.expand('<cword>') - if vim.fn.index({'vim', 'help'}, vim.bo.filetype) >= 0 then - vim.api.nvim_command('h ' .. cw) - elseif vim.api.nvim_eval('coc#rpc#ready()') then - vim.fn.CocActionAsync('doHover') - else - vim.api.nvim_command('!' .. vim.o.keywordprg .. ' ' .. cw) - end -end - - --- Highlight the symbol and its references on a CursorHold event(cursor is idle) -vim.api.nvim_create_augroup("CocGroup", {}) -vim.api.nvim_create_autocmd("CursorHold", { - group = "CocGroup", - command = "silent call CocActionAsync('highlight')", - desc = "Highlight symbol under cursor on CursorHold" -}) - - --- Symbol renaming -keyset("n", "<leader>rn", "<Plug>(coc-rename)", {silent = true}) - - --- Formatting selected code -keyset("x", "<leader>f", "<Plug>(coc-format-selected)", {silent = true}) -keyset("n", "<leader>f", "<Plug>(coc-format-selected)", {silent = true}) - - --- Setup formatexpr specified filetype(s) -vim.api.nvim_create_autocmd("FileType", { - group = "CocGroup", - pattern = "typescript,json", - command = "setl formatexpr=CocAction('formatSelected')", - desc = "Setup formatexpr specified filetype(s)." -}) - --- Update signature help on jump placeholder -vim.api.nvim_create_autocmd("User", { - group = "CocGroup", - pattern = "CocJumpPlaceholder", - command = "call CocActionAsync('showSignatureHelp')", - desc = "Update signature help on jump placeholder" -}) - --- Apply codeAction to the selected region --- Example: `<leader>aap` for current paragraph -local opts = {silent = true, nowait = true} -keyset("x", "<leader>a", "<Plug>(coc-codeaction-selected)", opts) -keyset("n", "<leader>a", "<Plug>(coc-codeaction-selected)", opts) - --- Remap keys for apply code actions at the cursor position. -keyset("n", "<leader>ac", "<Plug>(coc-codeaction-cursor)", opts) --- Remap keys for apply source code actions for current file. -keyset("n", "<leader>as", "<Plug>(coc-codeaction-source)", opts) --- Apply the most preferred quickfix action on the current line. -keyset("n", "<leader>qf", "<Plug>(coc-fix-current)", opts) - --- Remap keys for apply refactor code actions. -keyset("n", "<leader>re", "<Plug>(coc-codeaction-refactor)", { silent = true }) -keyset("x", "<leader>r", "<Plug>(coc-codeaction-refactor-selected)", { silent = true }) -keyset("n", "<leader>r", "<Plug>(coc-codeaction-refactor-selected)", { silent = true }) - --- Run the Code Lens actions on the current line -keyset("n", "<leader>cl", "<Plug>(coc-codelens-action)", opts) - - --- Map function and class text objects --- NOTE: Requires 'textDocument.documentSymbol' support from the language server -keyset("x", "if", "<Plug>(coc-funcobj-i)", opts) -keyset("o", "if", "<Plug>(coc-funcobj-i)", opts) -keyset("x", "af", "<Plug>(coc-funcobj-a)", opts) -keyset("o", "af", "<Plug>(coc-funcobj-a)", opts) -keyset("x", "ic", "<Plug>(coc-classobj-i)", opts) -keyset("o", "ic", "<Plug>(coc-classobj-i)", opts) -keyset("x", "ac", "<Plug>(coc-classobj-a)", opts) -keyset("o", "ac", "<Plug>(coc-classobj-a)", opts) - - --- Remap <C-f> and <C-b> to scroll float windows/popups ----@diagnostic disable-next-line: redefined-local -local opts = {silent = true, nowait = true, expr = true} -keyset("n", "<C-f>", 'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"', opts) -keyset("n", "<C-b>", 'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"', opts) -keyset("i", "<C-f>", -'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(1)<cr>" : "<Right>"', opts) -keyset("i", "<C-b>", -'coc#float#has_scroll() ? "<c-r>=coc#float#scroll(0)<cr>" : "<Left>"', opts) -keyset("v", "<C-f>", 'coc#float#has_scroll() ? coc#float#scroll(1) : "<C-f>"', opts) -keyset("v", "<C-b>", 'coc#float#has_scroll() ? coc#float#scroll(0) : "<C-b>"', opts) - - --- Use CTRL-S for selections ranges --- Requires 'textDocument/selectionRange' support of language server -keyset("n", "<C-s>", "<Plug>(coc-range-select)", {silent = true}) -keyset("x", "<C-s>", "<Plug>(coc-range-select)", {silent = true}) - - --- Add `:Format` command to format current buffer -vim.api.nvim_create_user_command("Format", "call CocAction('format')", {}) - --- " Add `:Fold` command to fold current buffer -vim.api.nvim_create_user_command("Fold", "call CocAction('fold', <f-args>)", {nargs = '?'}) - --- Add `:OR` command for organize imports of the current buffer -vim.api.nvim_create_user_command("OR", "call CocActionAsync('runCommand', 'editor.action.organizeImport')", {}) - --- Add (Neo)Vim's native statusline support --- NOTE: Please see `:h coc-status` for integrations with external plugins that --- provide custom statusline: lightline.vim, vim-airline -vim.opt.statusline:prepend("%{coc#status()}%{get(b:,'coc_current_function','')}") - --- Mappings for CoCList --- code actions and coc stuff ----@diagnostic disable-next-line: redefined-local -local opts = {silent = true, nowait = true} --- Show all diagnostics -keyset("n", "<space>a", ":<C-u>CocList diagnostics<cr>", opts) --- Manage extensions -keyset("n", "<space>e", ":<C-u>CocList extensions<cr>", opts) --- Show commands -keyset("n", "<space>c", ":<C-u>CocList commands<cr>", opts) --- Find symbol of current document -keyset("n", "<space>o", ":<C-u>CocList outline<cr>", opts) --- Search workspace symbols -keyset("n", "<space>s", ":<C-u>CocList -I symbols<cr>", opts) --- Do default action for next item -keyset("n", "<space>j", ":<C-u>CocNext<cr>", opts) --- Do default action for previous item -keyset("n", "<space>k", ":<C-u>CocPrev<cr>", opts) --- Resume latest coc list -keyset("n", "<space>p", ":<C-u>CocListResume<cr>", opts) diff --git a/lua/harpoon/harpoon.lua b/lua/harpoon/harpoon.lua deleted file mode 100644 index e69de29..0000000 --- a/lua/harpoon/harpoon.lua +++ /dev/null diff --git a/lua/nvim_dap/nvim_dap.lua b/lua/nvim_dap/nvim_dap.lua deleted file mode 100644 index 209cab1..0000000 --- a/lua/nvim_dap/nvim_dap.lua +++ /dev/null @@ -1,37 +0,0 @@ -local dap = require "dap" -local ui = require "dapui" - -require("dapui").setup() -require("nvim-dap-virtual-text").setup() -require("mason").setup() - -dap.adapters.codelldb = { - type = "executable", - command = "codelldb", -- or if not in $PATH: "/absolute/path/to/codelldb" -} - -dap.configurations.cpp = { - { - name = "Launch file", - type = "codelldb", - request = "launch", - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - }, -} - -dap.listeners.before.attach.dapui_config = function() - ui.open() -end -dap.listeners.before.launch.dapui_config = function() - ui.open() -end -dap.listeners.before.event_terminated.dapui_config = function() - ui.close() -end -dap.listeners.before.event_exited.dapui_config = function() - ui.close() -end diff --git a/lua/nvim_settings/lsp.lua b/lua/nvim_settings/lsp.lua deleted file mode 100644 index 407e6ce..0000000 --- a/lua/nvim_settings/lsp.lua +++ /dev/null @@ -1,3 +0,0 @@ -vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { - border = "rounded", -}) diff --git a/lua/statusline/statusline.lua b/lua/statusline/statusline.lua deleted file mode 100644 index 73dae10..0000000 --- a/lua/statusline/statusline.lua +++ /dev/null @@ -1,40 +0,0 @@ -require('lualine').setup { - options = { - icons_enabled = false, - theme = 'material', - component_separators = { left = '', right = ''}, - section_separators = { left = '', right = ''}, - disabled_filetypes = { - statusline = {}, - winbar = {}, - }, - ignore_focus = {}, - always_divide_middle = true, - globalstatus = false, - refresh = { - statusline = 1000, - tabline = 1000, - winbar = 1000, - } - }, - sections = { - lualine_a = {'mode'}, - lualine_b = {'branch', 'diff', 'diagnostics'}, - lualine_c = {'filename'}, - lualine_x = {'encoding', 'fileformat', 'filetype'}, - lualine_y = {'progress'}, - lualine_z = {'location'} - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = {'filename'}, - lualine_x = {'location'}, - lualine_y = {}, - lualine_z = {} - }, - tabline = {}, - winbar = {}, - inactive_winbar = {}, - extensions = {} -} diff --git a/lua/telescope/telescope.lua b/lua/telescope/telescope.lua deleted file mode 100644 index 5e9b476..0000000 --- a/lua/telescope/telescope.lua +++ /dev/null @@ -1,31 +0,0 @@ -local actions = require("telescope.actions") - -require("telescope").setup({ - defaults = { - -- Default configuration for telescope goes here: - -- config_key = value, - mappings = { - i = { - -- map actions.which_key to <C-h> (default: <C-/>) - -- actions.which_key shows the mappings for your picker, - -- e.g. git_{create, delete, ...}_branch for the git_branches picker - ["<C-j>"] = actions.move_selection_next, - ["<C-k>"] = actions.move_selection_previous, - ["<C-n>"] = actions.preview_scrolling_down, - ["<C-p>"] = actions.preview_scrolling_up, - ["<esc>"] = actions.close, - } - } - }, - extensions = { - coc = { - theme = 'ivy', - prefer_locations = true, -- always use Telescope locations to preview definitions/declarations/implementations etc - push_cursor_on_edit = true, -- save the cursor position to jump back in the future - timeout = 3000, -- timeout for coc commands - }, - fzf = {} - }, -}) -require('telescope').load_extension('coc') -require('telescope').load_extension('fzf') diff --git a/lua/theme/duskfox.lua b/lua/theme/duskfox.lua deleted file mode 100644 index e135884..0000000 --- a/lua/theme/duskfox.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd([[colorscheme duskfox]]) diff --git a/lua/theme/gruvbox.lua b/lua/theme/gruvbox.lua deleted file mode 100644 index 869cc44..0000000 --- a/lua/theme/gruvbox.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd([[colorscheme gruvbox]]) diff --git a/lua/theme/kanagawa.lua b/lua/theme/kanagawa.lua deleted file mode 100644 index de4da4f..0000000 --- a/lua/theme/kanagawa.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd([[colorscheme kanagawa-dragon]]) diff --git a/lua/theme/nightfox.lua b/lua/theme/nightfox.lua deleted file mode 100644 index e8338a2..0000000 --- a/lua/theme/nightfox.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd([[colorscheme nightfox]]) diff --git a/lua/theme/rose-pine.lua b/lua/theme/rose-pine.lua deleted file mode 100644 index 4398a3e..0000000 --- a/lua/theme/rose-pine.lua +++ /dev/null @@ -1,71 +0,0 @@ -require("rose-pine").setup({ - variant = "auto", -- auto, main, moon, or dawn - dark_variant = "main", -- main, moon, or dawn - dim_inactive_windows = false, - extend_background_behind_borders = true, - - enable = { - terminal = true, - legacy_highlights = true, -- Improve compatibility for previous versions of Neovim - migrations = true, -- Handle deprecated options automatically - }, - - styles = { - bold = false, - italic = true, - transparency = false, - }, - - groups = { - border = "muted", - link = "iris", - panel = "surface", - - error = "love", - hint = "iris", - info = "foam", - note = "pine", - todo = "rose", - warn = "gold", - - git_add = "foam", - git_change = "rose", - git_delete = "love", - git_dirty = "rose", - git_ignore = "muted", - git_merge = "iris", - git_rename = "pine", - git_stage = "iris", - git_text = "rose", - git_untracked = "subtle", - - h1 = "iris", - h2 = "foam", - h3 = "rose", - h4 = "gold", - h5 = "pine", - h6 = "foam", - }, - - highlight_groups = { - -- Comment = { fg = "foam" }, - -- VertSplit = { fg = "muted", bg = "muted" }, - }, - - before_highlight = function(group, highlight, palette) - -- Disable all undercurls - -- if highlight.undercurl then - -- highlight.undercurl = false - -- end - -- - -- Change palette colour - -- if highlight.fg == palette.pine then - -- highlight.fg = palette.foam - -- end - end, -}) - -vim.cmd("colorscheme rose-pine") --- vim.cmd("colorscheme rose-pine-main") --- vim.cmd("colorscheme rose-pine-moon") --- vim.cmd("colorscheme rose-pine-dawn") diff --git a/lua/theme/seoul.lua b/lua/theme/seoul.lua deleted file mode 100644 index daa643c..0000000 --- a/lua/theme/seoul.lua +++ /dev/null @@ -1 +0,0 @@ -vim.cmd([[colorscheme seoul256]]) diff --git a/lua/transparent/transparent.lua b/lua/transparent/transparent.lua deleted file mode 100644 index 818f5df..0000000 --- a/lua/transparent/transparent.lua +++ /dev/null @@ -1,11 +0,0 @@ -require("transparent").setup({ - extra_groups = { -- table/string: additional groups that should be cleared - -- In particular, when you set it to 'all', that means all available groups - -- "NormalFloat", - -- "FloatBorder", - -- "TelescopeBorder", - -- "TelescopeNormal", - -- "TelescopeSelection", - -- "TelescopeSelectionCaret" -}, -}) diff --git a/lua/treesitter/treesitter.lua b/lua/treesitter/treesitter.lua deleted file mode 100644 index 3cf605f..0000000 --- a/lua/treesitter/treesitter.lua +++ /dev/null @@ -1,41 +0,0 @@ -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" (the five listed parsers should always be installed) - ensure_installed = { "c", "cpp", "lua", "vim", "vimdoc"}, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - -- List of parsers to ignore installing (or "all") - ignore_install = { "html" }, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - highlight = { - enable = true, - - -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to - -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is - -- the name of the parser) - -- list of language that will be disabled - -- disable = { "c", "rust" }, - -- Or use a function for more flexibility, e.g. to disable slow treesitter highlight for large files - disable = function(lang, buf) - local max_filesize = 100 * 1024 -- 100 KB - local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) - if ok and stats and stats.size > max_filesize then - return true - end - end, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} |
