improve terminal keymap and lsp config

This commit is contained in:
alice-vu-163 2025-05-06 17:14:31 +07:00
parent ee1be1a29a
commit b2fd5f73e2
6 changed files with 20 additions and 26 deletions

View File

@ -1027,7 +1027,6 @@ require('lazy').setup({
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
{ import = 'custom.plugins' },
{ import = 'custom.keymaps' },
{ import = 'custom.setups' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!

View File

@ -40,4 +40,7 @@ vim.keymap.set('n', '<leader>bd', function()
vim.cmd 'bdelete!'
end, { desc = 'Close buffer and toggleterm' })
vim.keymap.set('n', '<leader>/', require('telescope.builtin').current_buffer_fuzzy_find, { desc = '[/] Fuzzy search in current buffer' })
vim.keymap.set('t', '<Esc>', [[<C-\><C-n>]], { desc = 'Exit terminal mode' })
return {}

View File

@ -3,6 +3,23 @@
--
-- See the kickstart.nvim README for more information
return {
{
'akinsho/toggleterm.nvim',
version = '*',
config = function()
require('toggleterm').setup {
direction = 'float',
float_opts = {
border = 'curved',
width = 100,
height = 30,
winblend = 0,
},
open_mapping = [[<C-\>]],
start_in_insert = true,
}
end,
},
{
'folke/tokyonight.nvim',
lazy = false,

View File

@ -1,3 +0,0 @@
-- Then load your custom setup scripts
require 'custom.setups.lsp'
require 'custom.setups.term'

View File

@ -1,12 +0,0 @@
require('lspconfig').pyright.setup {
settings = {
python = {
analysis = {
typeCheckingMode = 'off', -- disables type checking
diagnosticMode = 'openFilesOnly', -- optional: only analyze open files
autoSearchPaths = true,
useLibraryCodeForTypes = true,
},
},
},
}

View File

@ -1,10 +0,0 @@
require('toggleterm').setup {
direction = 'float',
float_opts = {
border = 'curved',
width = 100,
height = 30,
winblend = 0, -- optional: transparency
-- Omit row/col so it's automatically centered
},
}