This commit is contained in:
dla 2024-09-13 16:53:52 +07:00
parent 6bda505492
commit 707a02cab8
5 changed files with 46 additions and 22 deletions

View File

@ -92,9 +92,10 @@ vim.g.maplocalleader = ' '
require 'custom.options' require 'custom.options'
require 'custom.keymaps' require 'custom.keymaps'
require 'custom.settings'
-- Set to true if you have a Nerd Font installed and selected in the terminal -- 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 ]] -- [[ Setting options ]]
-- See `:help vim.opt` -- See `:help vim.opt`
@ -381,15 +382,19 @@ require('lazy').setup({
-- [[ Configure Telescope ]] -- [[ Configure Telescope ]]
-- See `:help telescope` and `:help telescope.setup()` -- See `:help telescope` and `:help telescope.setup()`
local actions = require 'telescope.actions'
require('telescope').setup { require('telescope').setup {
-- You can put your default mappings / updates / etc. in here -- You can put your default mappings / updates / etc. in here
-- All the info you're looking for is in `:help telescope.setup()` -- All the info you're looking for is in `:help telescope.setup()`
-- --
-- defaults = { defaults = {
-- mappings = { wrap_results = true,
-- i = { ['<c-enter>'] = 'to_fuzzy_refine' }, i = {
-- }, --['<C-k>'] = actions.move_selection_previous,
-- }, --['<C-j>'] = actions.move_selection_next,
--['<c-enter>'] = 'to_fuzzy_refine',
},
},
-- pickers = {} -- pickers = {}
extensions = { extensions = {
['ui-select'] = { ['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/ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = { local servers = {
clangd = {}, clangd = {},
gopls = {}, --gopls = {},
pyright = {}, pyright = {},
rust_analyzer = {}, rust_analyzer = {},
bashls = {}, bashls = {},

View File

@ -4,7 +4,11 @@ vim.keymap.set('n', '<leader>l', ':set hlsearch!<CR>', { noremap = true, silent
vim.keymap.set('n', '<C-s>', ':w<CR>', { noremap = true, silent = true }) vim.keymap.set('n', '<C-s>', ':w<CR>', { noremap = true, silent = true })
vim.keymap.set('i', '<C-s>', '<Esc>:w<CR>', { noremap = true, silent = true }) vim.keymap.set('i', '<C-s>', '<Esc>:w<CR>', { noremap = true, silent = true })
-- Map Ctrl-c to yank (copy) the selected text in visual mode vim.keymap.set('v', '<C-c', ':OSCYankVisual<CR>', { noremap = true, silent = true })
vim.keymap.set('v', '<C-c>', '"+y', { noremap = true, silent = true })
vim.keymap.set('n', '<C-c>', '<Esc>', { noremap = true, silent = true }) -- Map Ctrl-c to Esc in normal mode
--vim.keymap.set('n', '<C-c>', '<Esc>', { noremap = true, silent = true })
-- Toggle comment
vim.keymap.set('n', '<C-\\>', '<plug>NERDCommenterToggle', { noremap = true, silent = true })
vim.keymap.set('v', '<C-\\>', '<plug>NERDCommenterToggle', { noremap = true, silent = true })

View File

@ -2,10 +2,19 @@
-- I promise not to create any merge conflicts in this directory :) -- I promise not to create any merge conflicts in this directory :)
-- --
-- See the kickstart.nvim README for more information -- See the kickstart.nvim README for more information
return {
{ local function create_plugin(plugin_name)
'mtdl9/vim-log-highlighting', return {
plugin_name,
opts = {}, opts = {},
config = function() end, 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',
} }

6
lua/custom/settings.lua Normal file
View File

@ -0,0 +1,6 @@
vim.api.nvim_create_autocmd('User', {
pattern = 'TelescopePreviewerLoaded',
callback = function(args)
vim.wo.wrap = true
end,
})

View File

@ -11,15 +11,15 @@ return {
}, },
cmd = 'Neotree', cmd = 'Neotree',
keys = { keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true }, { '\\', ':Neotree toggle=true reveal=true action=show<CR>', desc = 'NeoTree reveal', silent = true },
}, },
opts = { opts = {
filesystem = { -- filesystem = {
window = { -- window = {
mappings = { -- mappings = {
['\\'] = 'close_window', -- ['\\'] = 'close_window',
}, -- },
}, -- },
}, -- },
}, },
} }