added new plugins
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
vim.g.mapleader = " "
|
||||
|
||||
vim.keymap.set("n", "<leader>n", vim.cmd.Ex)
|
||||
|
||||
-- Prime said this is greatest remap ever
|
||||
vim.keymap.set("x", "<leader>p", [["_dP]])
|
||||
vim.keymap.set('n', 'P', '"+p')
|
||||
|
||||
|
||||
-- some next greatest remaps
|
||||
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
|
||||
@@ -14,12 +17,6 @@ vim.keymap.set({"n", "v"}, "<leader>d", [["_d]])
|
||||
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||
|
||||
-- Pasting from clipboard hurts in vim
|
||||
vim.keymap.set('n', 'P', '"+p')
|
||||
|
||||
-- Copying to Clipboard
|
||||
--vim.keymap.set('v', '<leader>y', '"+y')
|
||||
|
||||
vim.keymap.set('n', '<leader>h', vim.cmd.split)
|
||||
vim.keymap.set('n', '<leader>v', vim.cmd.vsplit)
|
||||
|
||||
@@ -28,6 +25,10 @@ vim.keymap.set("n", "J", "mzJ`z")
|
||||
vim.keymap.set('n', '<C-d>', '<C-d>zz')
|
||||
vim.keymap.set('n', '<C-u>', '<C-u>zz')
|
||||
|
||||
-- stay in indent mode only
|
||||
vim.keymap.set("v", "<", "<gv")
|
||||
vim.keymap.set("v", ">", ">gv")
|
||||
|
||||
vim.keymap.set("n", "<Tab>", vim.cmd.bnext)
|
||||
vim.keymap.set("n", "<S-Tab>", vim.cmd.bprev)
|
||||
vim.keymap.set('n', '<leader>q', vim.cmd.bdelete)
|
||||
|
||||
@@ -12,12 +12,15 @@ vim.api.nvim_create_autocmd(
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.softtabstop = 4
|
||||
vim.opt.shiftwidth = 4
|
||||
vim.opt.shiftround = true
|
||||
vim.opt.expandtab = true
|
||||
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
vim.opt.wrap = true
|
||||
vim.opt.wrap = false
|
||||
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
|
||||
vim.opt.scrolloff = 8
|
||||
vim.opt.signcolumn = 'yes'
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
return{
|
||||
"FabijanZulj/blame.nvim",
|
||||
config = function()
|
||||
require("blame").setup{}
|
||||
end
|
||||
}
|
||||
|
||||
32
nvim/lua/lilJ/lazy/conform.lua
Normal file
32
nvim/lua/lilJ/lazy/conform.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
local conform = require("conform")
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
javascript = { { "prettierd", "prettier" } },
|
||||
typescript = { { "prettierd", "prettier" } },
|
||||
javascriptreact = { { "prettierd", "prettier" } },
|
||||
typescriptreact = { { "prettierd", "prettier" } },
|
||||
json = { { "prettierd", "prettier" } },
|
||||
markdown = { { "prettierd", "prettier" } },
|
||||
html = { "htmlbeautifier" },
|
||||
css = { { "prettierd", "prettier" } },
|
||||
go = { "gofmt" },
|
||||
cpp = { "clangformat" },
|
||||
c = { "clangformat" },
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set({ "n", "v" }, "<leader>l", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
})
|
||||
end, { desc = "Format file or range (in visual mode)" })
|
||||
end,
|
||||
}
|
||||
@@ -1,9 +1,31 @@
|
||||
return{
|
||||
return {
|
||||
|
||||
"nvim-lua/plenary.nvim",
|
||||
|
||||
"github/copilot.vim",
|
||||
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
config = function()
|
||||
require("illuminate")
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"FabijanZulj/blame.nvim",
|
||||
config = function()
|
||||
require("blame").setup{}
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
ft = { "markdown" },
|
||||
build = function() vim.fn["mkdp#util#install"]() end,
|
||||
},
|
||||
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
@@ -12,10 +34,10 @@ return{
|
||||
end
|
||||
},
|
||||
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
require('Comment').setup({
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
config = function()
|
||||
require('Comment').setup({
|
||||
toggler = {
|
||||
line = "gcc",
|
||||
block = "gbc",
|
||||
@@ -25,10 +47,9 @@ return{
|
||||
block = "gb",
|
||||
},
|
||||
})
|
||||
end
|
||||
},
|
||||
end
|
||||
},
|
||||
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
|
||||
{
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
|
||||
36
nvim/lua/lilJ/lazy/lint.lua
Normal file
36
nvim/lua/lilJ/lazy/lint.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
event = {
|
||||
"BufReadPre",
|
||||
"BufNewFile",
|
||||
},
|
||||
config = function()
|
||||
local lint = require("lint")
|
||||
|
||||
lint.linters_by_ft = {
|
||||
javascript = { "eslint_d" },
|
||||
typescript = { "eslint_d" },
|
||||
javascriptreact = { "eslint_d" },
|
||||
typescriptreact = { "eslint_d" },
|
||||
go = { "golangci_lint" },
|
||||
html = { "htmlhint" },
|
||||
css = { "stylelint" },
|
||||
python = { "flake8" },
|
||||
cpp = { "clangtidy" },
|
||||
c = { "clangtidy" },
|
||||
}
|
||||
|
||||
local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
lint.try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>ll", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Trigger linting for current file" })
|
||||
end,
|
||||
}
|
||||
@@ -86,9 +86,11 @@ return {
|
||||
mason_tool_installer.setup({
|
||||
ensure_installed = {
|
||||
"prettier",
|
||||
"prettierd",
|
||||
"stylua",
|
||||
-- "pylint",
|
||||
"pylint",
|
||||
"eslint_d",
|
||||
"htmlbeautifier",
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
||||
@@ -4,7 +4,7 @@ return {
|
||||
build = ":TSUpdate",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup ({
|
||||
ensure_installed = { "cpp", "typescript", "tsx", "c", "python" },
|
||||
ensure_installed = { "cpp", "typescript", "tsx", "c", "python", "go", "html" },
|
||||
|
||||
sync_install = false,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user