initial commit, add nvterm files to custom plugins
This commit is contained in:
parent
0e23601a63
commit
0587595f1e
8
init.lua
8
init.lua
|
@ -472,12 +472,12 @@ require('mason-lspconfig').setup()
|
||||||
-- If you want to override the default filetypes that your language server will attach to you can
|
-- If you want to override the default filetypes that your language server will attach to you can
|
||||||
-- define the property 'filetypes' to the map in question.
|
-- define the property 'filetypes' to the map in question.
|
||||||
local servers = {
|
local servers = {
|
||||||
-- clangd = {},
|
clangd = {},
|
||||||
-- gopls = {},
|
-- gopls = {},
|
||||||
pyright = { filetypes = {'py'} },
|
pyright = { filetypes = { 'py' } },
|
||||||
-- rust_analyzer = {},
|
rust_analyzer = {},
|
||||||
-- tsserver = {},
|
-- tsserver = {},
|
||||||
-- html = { filetypes = { 'html', 'twig', 'hbs'} },
|
html = { filetypes = { 'html', 'twig', 'hbs' } },
|
||||||
|
|
||||||
lua_ls = {
|
lua_ls = {
|
||||||
Lua = {
|
Lua = {
|
||||||
|
|
|
@ -7,12 +7,12 @@
|
||||||
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" },
|
"gitsigns.nvim": { "branch": "main", "commit": "ff01d34daaed72f271a8ffa088a7e839a60c640f" },
|
||||||
"indent-blankline.nvim": { "branch": "master", "commit": "877c1db2bf957300097dd5348a665666a4d900cb" },
|
"indent-blankline.nvim": { "branch": "master", "commit": "877c1db2bf957300097dd5348a665666a4d900cb" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "62745a7320f48a00ac4f7b0591352608cbc6bcea" },
|
"lazy.nvim": { "branch": "main", "commit": "f0cfbf995238a42064e119bd1daa694fd1683ea3" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "e2705063f395b44f676cd26596a11007a2cbd3bd" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "e2705063f395b44f676cd26596a11007a2cbd3bd" },
|
||||||
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
|
"mason-nvim-dap.nvim": { "branch": "main", "commit": "6148b51db945b55b3b725da39eaea6441e59dff8" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
||||||
"neo-tree.nvim": { "branch": "main", "commit": "71f1841ba6c652908678cece623f52c1fea8a6cd" },
|
"neo-tree.nvim": { "branch": "main", "commit": "6f8c49956c89e9fefae6acdfe1d57c6293b0a03d" },
|
||||||
"neodev.nvim": { "branch": "main", "commit": "f8592cc143a5512b98a2c3683aa43c73f98e34f7" },
|
"neodev.nvim": { "branch": "main", "commit": "f8592cc143a5512b98a2c3683aa43c73f98e34f7" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
|
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||||
|
@ -20,9 +20,10 @@
|
||||||
"nvim-dap-go": { "branch": "main", "commit": "a5cc8dcad43f0732585d4793deb02a25c4afb766" },
|
"nvim-dap-go": { "branch": "main", "commit": "a5cc8dcad43f0732585d4793deb02a25c4afb766" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
"nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "2b361e043810d5587d9af0787f8ce40da92ec5e9" },
|
"nvim-lspconfig": { "branch": "master", "commit": "2b361e043810d5587d9af0787f8ce40da92ec5e9" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "957f3f8c15a88ef0f0c77ecd13edf2e2578f176e" },
|
"nvim-treesitter": { "branch": "master", "commit": "a102053352bd958d84a3e1be3de0203d2af92984" },
|
||||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" },
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "56b3a6ce6d69329cbf603dd38ac59fb4d7774b01" },
|
"nvim-web-devicons": { "branch": "master", "commit": "56b3a6ce6d69329cbf603dd38ac59fb4d7774b01" },
|
||||||
|
"nvterm": { "branch": "main", "commit": "3e43be1d0ca60cc5e2dfc2d289b06577e7e57e98" },
|
||||||
"onedark.nvim": { "branch": "master", "commit": "826fb77e9ca92d3c0f3d937328663d4a6dc7fee1" },
|
"onedark.nvim": { "branch": "master", "commit": "826fb77e9ca92d3c0f3d937328663d4a6dc7fee1" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
return {
|
||||||
|
"NvChad/nvterm",
|
||||||
|
config = function()
|
||||||
|
require("nvterm").setup({
|
||||||
|
-- Basic Teminal Settings
|
||||||
|
terminals = {
|
||||||
|
shell = vim.o.shell,
|
||||||
|
list = {},
|
||||||
|
type_opts = {
|
||||||
|
float = {
|
||||||
|
relative = 'editor',
|
||||||
|
row = 0.3,
|
||||||
|
col = 0.25,
|
||||||
|
width = 0.5,
|
||||||
|
height = 0.4,
|
||||||
|
border = "single",
|
||||||
|
},
|
||||||
|
horizontal = { location = "rightbelow", split_ratio = .3, },
|
||||||
|
vertical = { location = "rightbelow", split_ratio = .5 },
|
||||||
|
}
|
||||||
|
},
|
||||||
|
behavior = {
|
||||||
|
autoclose_on_quit = {
|
||||||
|
enabled = false,
|
||||||
|
confirm = true,
|
||||||
|
},
|
||||||
|
close_on_exit = true,
|
||||||
|
auto_insert = true,
|
||||||
|
},
|
||||||
|
-- Additional Functionality
|
||||||
|
require "nvterm_config.lua"
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
require("nvterm").setup()
|
||||||
|
|
||||||
|
local terminal = require("nvterm.terminal")
|
||||||
|
|
||||||
|
local ft_cmds = {
|
||||||
|
python = "python3 " .. vim.fn.expand('%'),
|
||||||
|
...
|
||||||
|
--<your commands here>
|
||||||
|
}
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in New Issue