feat: add null-ls
This commit is contained in:
parent
35c150d633
commit
dc505162de
21
init.lua
21
init.lua
|
@ -127,16 +127,16 @@ require('lazy').setup({
|
||||||
|
|
||||||
-- don't override the built-in and fugitive keymaps
|
-- don't override the built-in and fugitive keymaps
|
||||||
local gs = package.loaded.gitsigns
|
local gs = package.loaded.gitsigns
|
||||||
vim.keymap.set({'n', 'v'}, ']c', function()
|
vim.keymap.set({ 'n', 'v' }, ']c', function()
|
||||||
if vim.wo.diff then return ']c' end
|
if vim.wo.diff then return ']c' end
|
||||||
vim.schedule(function() gs.next_hunk() end)
|
vim.schedule(function() gs.next_hunk() end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
|
end, { expr = true, buffer = bufnr, desc = "Jump to next hunk" })
|
||||||
vim.keymap.set({'n', 'v'}, '[c', function()
|
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
||||||
if vim.wo.diff then return '[c' end
|
if vim.wo.diff then return '[c' end
|
||||||
vim.schedule(function() gs.prev_hunk() end)
|
vim.schedule(function() gs.prev_hunk() end)
|
||||||
return '<Ignore>'
|
return '<Ignore>'
|
||||||
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
|
end, { expr = true, buffer = bufnr, desc = "Jump to previous hunk" })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -150,14 +150,14 @@ require('lazy').setup({
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
--{
|
||||||
-- Add indentation guides even on blank lines
|
-- Add indentation guides even on blank lines
|
||||||
'lukas-reineke/indent-blankline.nvim',
|
--'lukas-reineke/indent-blankline.nvim',
|
||||||
-- Enable `lukas-reineke/indent-blankline.nvim`
|
-- Enable `lukas-reineke/indent-blankline.nvim`
|
||||||
-- See `:help indent_blankline.txt`
|
-- See `:help indent_blankline.txt`
|
||||||
main = "ibl",
|
--main = "ibl",
|
||||||
opts = {},
|
--opts = {},
|
||||||
},
|
--},
|
||||||
|
|
||||||
-- "gc" to comment visual regions/lines
|
-- "gc" to comment visual regions/lines
|
||||||
{ 'numToStr/Comment.nvim', opts = {} },
|
{ 'numToStr/Comment.nvim', opts = {} },
|
||||||
|
@ -308,7 +308,8 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
|
||||||
-- See `:help nvim-treesitter`
|
-- See `:help nvim-treesitter`
|
||||||
require('nvim-treesitter.configs').setup {
|
require('nvim-treesitter.configs').setup {
|
||||||
-- Add languages to be installed here that you want installed for treesitter
|
-- Add languages to be installed here that you want installed for treesitter
|
||||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'terraform' },
|
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim',
|
||||||
|
'terraform' },
|
||||||
|
|
||||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "480b032f6708573334f4437d3f83307d143f1a72" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
|
||||||
|
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
|
||||||
|
"fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "e32efa6d6acb4a2e2e270f329df6a65080702066" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "59335c5b9d116f5d3948f833288a89e2a829a005" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "48025d62f45af52ba47e4193b854864839392e4c" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "d66c60e17dd6fd8165194b1d14d21f7eb2c1697a" },
|
||||||
|
"neo-tree.nvim": { "branch": "main", "commit": "71f1841ba6c652908678cece623f52c1fea8a6cd" },
|
||||||
|
"neodev.nvim": { "branch": "main", "commit": "41581561a0ffc6ea6a191ee90a23f8c1c7f470fb" },
|
||||||
|
"none-ls.nvim": { "branch": "main", "commit": "f39f627bbdfb33cc4ae4a95b4708e7dba7b9aafc" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "c8de23342caf8d50b15d6b28368d36a56a69d76f" },
|
||||||
|
"nvim-autopairs": { "branch": "master", "commit": "de4f7138a68d5d5063170f2182fd27faf06b0b54" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "eb1b53162755888ff75e495797071644d983bff7" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "811e8ba4f37821a9e7fe645573ceac4ee47cd542" },
|
||||||
|
"nvim-treesitter-textobjects": { "branch": "master", "commit": "bd103502252027434ec42f628d2dbf54821d4ce6" },
|
||||||
|
"nvim-web-devicons": { "branch": "master", "commit": "45d0237c427baba8cd05e0ab26d30e2ee58c2c82" },
|
||||||
|
"onedark.nvim": { "branch": "master", "commit": "dac8c39812dae025255c9069a260e1f69d967927" },
|
||||||
|
"onedarkpro.nvim": { "branch": "main", "commit": "7c02b4eeb310173ef6d741e60200d72b76923eae" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "9ce85b0f7dcfe5358c0be937ad23e456907d410b" },
|
||||||
|
"tabline.nvim": { "branch": "main", "commit": "ff33d12a20d52daafa5393162cae4108faf8128b" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||||
|
"telescope.nvim": { "branch": "0.1.x", "commit": "54930e1abfc94409e1bb9266e752ef8379008592" },
|
||||||
|
"vim-fugitive": { "branch": "master", "commit": "99db68d9b3304580bd383da7aaee05c7a954a344" },
|
||||||
|
"vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" },
|
||||||
|
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" }
|
||||||
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
-- See the kickstart.nvim README for more information
|
-- See the kickstart.nvim README for more information
|
||||||
return {
|
return {
|
||||||
"olimorris/onedarkpro.nvim",
|
"olimorris/onedarkpro.nvim",
|
||||||
config = function ()
|
config = function()
|
||||||
local keymap = vim.keymap
|
local keymap = vim.keymap
|
||||||
|
|
||||||
-- select all
|
-- select all
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
return {
|
||||||
|
"nvimtools/none-ls.nvim",
|
||||||
|
config = function()
|
||||||
|
local null_ls = require("null-ls")
|
||||||
|
|
||||||
|
null_ls.setup({
|
||||||
|
sources = {
|
||||||
|
null_ls.builtins.formatting.prettier,
|
||||||
|
null_ls.builtins.diagnostics.eslint,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
Loading…
Reference in New Issue