diff --git a/init.lua b/init.lua index a57806e2..c2441726 100644 --- a/init.lua +++ b/init.lua @@ -92,9 +92,10 @@ vim.g.maplocalleader = ' ' require 'custom.options' require 'custom.keymaps' +require 'custom.settings' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -381,15 +382,19 @@ require('lazy').setup({ -- [[ Configure Telescope ]] -- See `:help telescope` and `:help telescope.setup()` + local actions = require 'telescope.actions' require('telescope').setup { -- You can put your default mappings / updates / etc. in here -- All the info you're looking for is in `:help telescope.setup()` -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, + defaults = { + wrap_results = true, + i = { + --[''] = actions.move_selection_previous, + --[''] = actions.move_selection_next, + --[''] = 'to_fuzzy_refine', + }, + }, -- pickers = {} extensions = { ['ui-select'] = { @@ -609,7 +614,7 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { clangd = {}, - gopls = {}, + --gopls = {}, pyright = {}, rust_analyzer = {}, bashls = {}, diff --git a/lua/custom/keymaps.lua b/lua/custom/keymaps.lua index 799bcf49..bef4d0c7 100644 --- a/lua/custom/keymaps.lua +++ b/lua/custom/keymaps.lua @@ -4,7 +4,11 @@ vim.keymap.set('n', 'l', ':set hlsearch!', { noremap = true, silent vim.keymap.set('n', '', ':w', { noremap = true, silent = true }) vim.keymap.set('i', '', ':w', { noremap = true, silent = true }) --- Map Ctrl-c to yank (copy) the selected text in visual mode -vim.keymap.set('v', '', '"+y', { noremap = true, silent = true }) +vim.keymap.set('v', '', { noremap = true, silent = true }) -vim.keymap.set('n', '', '', { noremap = true, silent = true }) +-- Map Ctrl-c to Esc in normal mode +--vim.keymap.set('n', '', '', { noremap = true, silent = true }) + +-- Toggle comment +vim.keymap.set('n', '', 'NERDCommenterToggle', { noremap = true, silent = true }) +vim.keymap.set('v', '', 'NERDCommenterToggle', { noremap = true, silent = true }) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index efdc1c68..54966e8f 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,10 +2,19 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return { - { - 'mtdl9/vim-log-highlighting', + +local function create_plugin(plugin_name) + return { + plugin_name, opts = {}, config = function() end, - }, + } +end + +return { + create_plugin 'ojroques/vim-oscyank', + create_plugin 'thaerkh/vim-workspace', + create_plugin 'fatih/vim-go', + create_plugin 'preservim/nerdcommenter', + create_plugin 'mtdl9/vim-log-highlighting', } diff --git a/lua/custom/settings.lua b/lua/custom/settings.lua new file mode 100644 index 00000000..538f0c66 --- /dev/null +++ b/lua/custom/settings.lua @@ -0,0 +1,6 @@ +vim.api.nvim_create_autocmd('User', { + pattern = 'TelescopePreviewerLoaded', + callback = function(args) + vim.wo.wrap = true + end, +}) diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index bd442269..9a37d667 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -11,15 +11,15 @@ return { }, cmd = 'Neotree', keys = { - { '\\', ':Neotree reveal', desc = 'NeoTree reveal', silent = true }, + { '\\', ':Neotree toggle=true reveal=true action=show', desc = 'NeoTree reveal', silent = true }, }, opts = { - filesystem = { - window = { - mappings = { - ['\\'] = 'close_window', - }, - }, - }, + -- filesystem = { + -- window = { + -- mappings = { + -- ['\\'] = 'close_window', + -- }, + -- }, + -- }, }, }