currently working plugins (and happy with)
This commit is contained in:
parent
e603176927
commit
47696240f3
2
ftplugin/c.lua
Normal file
2
ftplugin/c.lua
Normal file
|
@ -0,0 +1,2 @@
|
|||
vim.cmd 'autocmd BufEnter * set formatoptions-=cro'
|
||||
vim.cmd 'autocmd BufEnter * setlocal formatoptions-=cro'
|
1
ftplugin/markdown.lua
Normal file
1
ftplugin/markdown.lua
Normal file
|
@ -0,0 +1 @@
|
|||
vim.opt_local.conceallevel = 2
|
17
ftplugin/python.lua
Normal file
17
ftplugin/python.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
-- original from: https://stackoverflow.com/questions/76954973/how-to-set-keybindings-to-execute-python-files-in-neovim-using-the-built-in-term
|
||||
|
||||
local function run_curr_python_file_in_toggleterm()
|
||||
local file_name = vim.api.nvim_buf_get_name(0)
|
||||
|
||||
local py_cmd = vim.api.nvim_replace_termcodes('python3 "' .. file_name .. '"<cr>', true, false, true)
|
||||
-- local py_cmd = vim.api.nvim_replace_termcodes('python3 "' .. file_name .. '"<cr> <Esc> :ToggleTerm', true, false, true)
|
||||
local end_cmd = vim.api.nvim_replace_termcodes('<C-d>', true, false, true)
|
||||
vim.cmd ':ToggleTerm direction=float'
|
||||
vim.api.nvim_feedkeys(py_cmd, 't', false)
|
||||
vim.api.nvim_feedkeys(end_cmd, 't', false)
|
||||
end
|
||||
|
||||
vim.keymap.set({ 'n' }, '<A-e>', '', {
|
||||
desc = 'Run .py file via Neovim built-in terminal',
|
||||
callback = run_curr_python_file_in_toggleterm,
|
||||
})
|
25
init.lua
25
init.lua
|
@ -6,6 +6,8 @@ vim.opt.termguicolors = true
|
|||
-- To make sure image.nvim works with luarocks
|
||||
package.path = package.path .. ';' .. vim.fn.expand '$HOME' .. '/.luarocks/share/lua/5.1/?/init.lua;'
|
||||
package.path = package.path .. ';' .. vim.fn.expand '$HOME' .. '/.luarocks/share/lua/5.1/?.lua'
|
||||
|
||||
vim.opt_local.autochdir = true
|
||||
-- END OF TESTING REGION
|
||||
|
||||
--[[
|
||||
|
@ -176,6 +178,9 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
|
|||
|
||||
-- Diagnostic keymaps
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' })
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
|
||||
|
||||
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
|
||||
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
|
||||
|
@ -579,10 +584,10 @@ require('lazy').setup({
|
|||
-- - settings (table): Override the default settings passed when initializing the server.
|
||||
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
|
||||
local servers = {
|
||||
-- clangd = {},
|
||||
-- gopls = {},
|
||||
-- pyright = {},
|
||||
-- rust_analyzer = {},
|
||||
clangd = {},
|
||||
gopls = {},
|
||||
pyright = {},
|
||||
rust_analyzer = {},
|
||||
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
|
||||
--
|
||||
-- Some languages (like typescript) have entire language plugins that can be useful:
|
||||
|
@ -890,12 +895,12 @@ require('lazy').setup({
|
|||
-- Here are some example plugins that I've included in the Kickstart repository.
|
||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
--
|
||||
-- require 'kickstart.plugins.debug',
|
||||
-- require 'kickstart.plugins.indent_line',
|
||||
-- require 'kickstart.plugins.lint',
|
||||
-- require 'kickstart.plugins.autopairs',
|
||||
-- require 'kickstart.plugins.neo-tree',
|
||||
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
require 'kickstart.plugins.debug',
|
||||
require 'kickstart.plugins.indent_line',
|
||||
require 'kickstart.plugins.lint',
|
||||
require 'kickstart.plugins.autopairs',
|
||||
require 'kickstart.plugins.neo-tree',
|
||||
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
|
||||
|
||||
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
|
||||
-- This is the easiest way to modularize your config.
|
||||
|
|
6
lua/custom/plugins/compiler.lua
Normal file
6
lua/custom/plugins/compiler.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
return {
|
||||
'Zeioth/compiler.nvim',
|
||||
cmd = { 'CompilerOpen', 'CompilerToggleResults', 'CompilerRedo' },
|
||||
dependencies = { 'stevearc/overseer.nvim', 'nvim-telescope/telescope.nvim' },
|
||||
opts = {},
|
||||
}
|
11
lua/custom/plugins/emoji.lua
Normal file
11
lua/custom/plugins/emoji.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
return {
|
||||
'allaman/emoji.nvim',
|
||||
ft = 'markdown',
|
||||
dependencies = {
|
||||
'hrsh7th/nvim-cmp',
|
||||
'nvim-telescope/telescope.nvim',
|
||||
},
|
||||
config = function()
|
||||
require('telescope').load_extension 'emoji'
|
||||
end,
|
||||
}
|
17
lua/custom/plugins/noice.lua
Normal file
17
lua/custom/plugins/noice.lua
Normal file
|
@ -0,0 +1,17 @@
|
|||
return {
|
||||
{
|
||||
'folke/noice.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
-- add any options here
|
||||
},
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
'MunifTanjim/nui.nvim',
|
||||
-- OPTIONAL:
|
||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||
-- If not available, we use `mini` as the fallback
|
||||
'rcarriga/nvim-notify',
|
||||
},
|
||||
},
|
||||
}
|
|
@ -22,5 +22,6 @@ return {
|
|||
date_format = '%Y-%m-%d',
|
||||
time_format = '%H:%M',
|
||||
},
|
||||
disable_frontmatter = true,
|
||||
},
|
||||
}
|
||||
|
|
13
lua/custom/plugins/overseer.lua
Normal file
13
lua/custom/plugins/overseer.lua
Normal file
|
@ -0,0 +1,13 @@
|
|||
return {
|
||||
'stevearc/overseer.nvim',
|
||||
commit = '6271cab7ccc4ca840faa93f54440ffae3a3918bd',
|
||||
cmd = { 'CompilerOpen', 'CompilerToggleResults', 'CompilerRedo' },
|
||||
opts = {
|
||||
task_list = {
|
||||
direction = 'bottom',
|
||||
min_height = 25,
|
||||
max_height = 25,
|
||||
default_detail = 1,
|
||||
},
|
||||
},
|
||||
}
|
46
lua/custom/plugins/pastify.lua
Normal file
46
lua/custom/plugins/pastify.lua
Normal file
|
@ -0,0 +1,46 @@
|
|||
return {
|
||||
'TobinPalmer/pastify.nvim',
|
||||
cmd = { 'Pastify', 'PastifyAfter' },
|
||||
event = { 'BufReadPost' }, -- Load after the buffer is read, I like to be able to paste right away
|
||||
keys = {
|
||||
{ noremap = true, mode = 'x', '<leader>p', '<cmd>PastifyAfter<CR>' },
|
||||
{ noremap = true, mode = 'n', '<leader>p', '<cmd>PastifyAfter<CR>' },
|
||||
{ noremap = true, mode = 'n', '<leader>P', '<cmd>Pastify<CR>' },
|
||||
},
|
||||
config = function()
|
||||
require('pastify').setup {
|
||||
opts = {
|
||||
absolute_path = false, -- use absolute or relative path to the working directory
|
||||
apikey = '', -- Api key, required for online saving
|
||||
local_path = '/assets/imgs/', -- The path to put local files in, ex ~/Projects/<name>/assets/images/<imgname>.png
|
||||
save = 'local', -- Either 'local' or 'online' or 'local_file'
|
||||
filename = function()
|
||||
return vim.fn.expand '%:t:r' .. '_' .. os.date '%Y-%m-%d_%H-%M-%S'
|
||||
end,
|
||||
default_ft = 'markdown', -- Default filetype to use
|
||||
},
|
||||
ft = { -- Custom snippets for different filetypes, will replace $IMG$ with the image url
|
||||
html = '<img src="$IMG$" alt="">',
|
||||
markdown = '![]($IMG$)',
|
||||
tex = [[\includegraphics[width=\linewidth]{$IMG$}]],
|
||||
css = 'background-image: url("$IMG$");',
|
||||
js = 'const img = new Image(); img.src = "$IMG$";',
|
||||
xml = '<image src="$IMG$" />',
|
||||
php = '<?php echo "<img src="$IMG$" alt="">"; ?>',
|
||||
python = '# $IMG$',
|
||||
java = '// $IMG$',
|
||||
c = '// $IMG$',
|
||||
cpp = '// $IMG$',
|
||||
swift = '// $IMG$',
|
||||
kotlin = '// $IMG$',
|
||||
go = '// $IMG$',
|
||||
typescript = '// $IMG$',
|
||||
ruby = '# $IMG$',
|
||||
vhdl = '-- $IMG$',
|
||||
verilog = '// $IMG$',
|
||||
systemverilog = '// $IMG$',
|
||||
lua = '-- $IMG$',
|
||||
},
|
||||
}
|
||||
end,
|
||||
}
|
7
lua/custom/plugins/smoji.lua
Normal file
7
lua/custom/plugins/smoji.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
return {
|
||||
'zakissimo/smoji.nvim',
|
||||
config = function()
|
||||
require 'smoji'
|
||||
vim.keymap.set('n', '<Leader>em', '<CMD>Smoji<CR>')
|
||||
end,
|
||||
}
|
Loading…
Reference in New Issue
Block a user