Add nvterm among other things
This commit is contained in:
parent
1645f2fbe9
commit
de52bc6ece
48
init.lua
48
init.lua
|
@ -729,7 +729,7 @@ require('lazy').setup({
|
|||
-- Accept ([y]es) the completion.
|
||||
-- This will auto-import if your LSP supports it.
|
||||
-- This will expand snippets if the LSP sent a snippet.
|
||||
['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
-- ['<C-y>'] = cmp.mapping.confirm { select = true },
|
||||
|
||||
-- If you prefer more traditional completion keymaps,
|
||||
-- you can uncomment the following lines
|
||||
|
@ -773,23 +773,23 @@ require('lazy').setup({
|
|||
end,
|
||||
},
|
||||
|
||||
{ -- You can easily change to a different colorscheme.
|
||||
-- Change the name of the colorscheme plugin below, and then
|
||||
-- change the command in the config to whatever the name of that colorscheme is.
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
init = function()
|
||||
-- Load the colorscheme here.
|
||||
-- Like many other themes, this one has different styles, and you could load
|
||||
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
vim.cmd.colorscheme 'tokyonight-night'
|
||||
|
||||
-- You can configure highlights by doing something like:
|
||||
vim.cmd.hi 'Comment gui=none'
|
||||
end,
|
||||
},
|
||||
-- { -- You can easily change to a different colorscheme.
|
||||
-- -- Change the name of the colorscheme plugin below, and then
|
||||
-- -- change the command in the config to whatever the name of that colorscheme is.
|
||||
-- --
|
||||
-- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
-- 'folke/tokyonight.nvim',
|
||||
-- priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
-- init = function()
|
||||
-- -- Load the colorscheme here.
|
||||
-- -- Like many other themes, this one has different styles, and you could load
|
||||
-- -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
|
||||
-- -- vim.cmd.colorscheme 'tokyonight-night'
|
||||
--
|
||||
-- -- You can configure highlights by doing something like:
|
||||
-- vim.cmd.hi 'Comment gui=none'
|
||||
-- end,
|
||||
-- },
|
||||
|
||||
-- Highlight todo, notes, etc in comments
|
||||
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
|
||||
|
@ -815,17 +815,17 @@ require('lazy').setup({
|
|||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
local statusline = require 'mini.statusline'
|
||||
-- local statusline = require 'mini.statusline'
|
||||
-- set use_icons to true if you have a Nerd Font
|
||||
statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
-- statusline.setup { use_icons = vim.g.have_nerd_font }
|
||||
|
||||
-- You can configure sections in the statusline by overriding their
|
||||
-- default behavior. For example, here we set the section for
|
||||
-- cursor location to LINE:COLUMN
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
statusline.section_location = function()
|
||||
return '%2l:%-2v'
|
||||
end
|
||||
-- ---@diagnostic disable-next-line: duplicate-set-field
|
||||
-- statusline.section_location = function()
|
||||
-- return '%2l:%-2v'
|
||||
-- end
|
||||
|
||||
-- ... and there is more!
|
||||
-- Check out: https://github.com/echasnovski/mini.nvim
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
return {
|
||||
{
|
||||
'catppuccin/nvim',
|
||||
name = 'catppuccin',
|
||||
priority = 1000,
|
||||
},
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
return {
|
||||
{
|
||||
'catppuccin/nvim',
|
||||
name = 'catppuccin',
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
opts = {
|
||||
flavour = 'mocha',
|
||||
},
|
||||
config = function()
|
||||
vim.cmd.colorscheme 'catppuccin'
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
return {
|
||||
'github/copilot.vim',
|
||||
enabled = false,
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
return {
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = {
|
||||
'nvim-tree/nvim-web-devicons',
|
||||
},
|
||||
config = function()
|
||||
require('lualine').setup {
|
||||
options = {
|
||||
theme = 'dracula',
|
||||
section_separators = '',
|
||||
component_separators = '',
|
||||
},
|
||||
sections = {
|
||||
lualine_a = {
|
||||
'mode',
|
||||
'buffers',
|
||||
},
|
||||
lualine_c = {},
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
return {
|
||||
{
|
||||
'NeogitOrg/neogit',
|
||||
version = 'v0.0.1', -- Version required for nvim 0.9.5
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
'sindrets/diffview.nvim',
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
return {
|
||||
{
|
||||
'NvChad/nvterm',
|
||||
config = function()
|
||||
require('nvterm').setup()
|
||||
local ft_cmds = {
|
||||
python = 'python3' .. vim.fn.expand '%',
|
||||
}
|
||||
local terminal = require 'nvterm.terminal'
|
||||
local toggle_modes = { 'n', 't' }
|
||||
local mappings = {
|
||||
{
|
||||
'n',
|
||||
'<C-l>',
|
||||
function()
|
||||
terminal.send(ft_cmds[vim.bo.filetype])
|
||||
end,
|
||||
},
|
||||
{
|
||||
toggle_modes,
|
||||
'<A-h>',
|
||||
function()
|
||||
terminal.toggle 'horizontal'
|
||||
end,
|
||||
},
|
||||
{
|
||||
toggle_modes,
|
||||
'<A-v>',
|
||||
function()
|
||||
terminal.toggle 'vertical'
|
||||
end,
|
||||
},
|
||||
{
|
||||
toggle_modes,
|
||||
'<A-i>',
|
||||
function()
|
||||
terminal.toggle 'float'
|
||||
end,
|
||||
},
|
||||
}
|
||||
local opts = { noremap = true, silent = true }
|
||||
for _, mapping in ipairs(mappings) do
|
||||
vim.keymap.set(mapping[1], mapping[2], mapping[3], opts)
|
||||
end
|
||||
end,
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue