improve terminal keymap and lsp config
This commit is contained in:
parent
ee1be1a29a
commit
b2fd5f73e2
1
init.lua
1
init.lua
|
@ -1027,7 +1027,6 @@ require('lazy').setup({
|
||||||
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
|
||||||
{ import = 'custom.plugins' },
|
{ import = 'custom.plugins' },
|
||||||
{ import = 'custom.keymaps' },
|
{ import = 'custom.keymaps' },
|
||||||
{ import = 'custom.setups' },
|
|
||||||
--
|
--
|
||||||
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
|
||||||
-- Or use telescope!
|
-- Or use telescope!
|
||||||
|
|
|
@ -40,4 +40,7 @@ vim.keymap.set('n', '<leader>bd', function()
|
||||||
vim.cmd 'bdelete!'
|
vim.cmd 'bdelete!'
|
||||||
end, { desc = 'Close buffer and toggleterm' })
|
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 {}
|
return {}
|
||||||
|
|
|
@ -3,6 +3,23 @@
|
||||||
--
|
--
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {
|
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',
|
'folke/tokyonight.nvim',
|
||||||
lazy = false,
|
lazy = false,
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
-- Then load your custom setup scripts
|
|
||||||
require 'custom.setups.lsp'
|
|
||||||
require 'custom.setups.term'
|
|
|
@ -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,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
},
|
|
||||||
}
|
|
Loading…
Reference in New Issue