Compare commits
2 Commits
3394778b23
...
nvim-plugi
| Author | SHA1 | Date | |
|---|---|---|---|
| 76bdd7b9fe | |||
| a24380f314 |
1
nvim/.gitignore
vendored
Normal file
1
nvim/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
lazy-lock.json
|
||||
@@ -43,7 +43,7 @@ local common_group = vim.api.nvim_create_augroup('common', {clear = true})
|
||||
local spec_group = vim.api.nvim_create_augroup('lang_spec', {clear = true})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { "python", "make", "sh", "cmake" },
|
||||
pattern = { "python", "make", "sh", "cmake", "yaml", "toml" },
|
||||
callback = function(args)
|
||||
vim.keymap.set('v', '<leader>#', ':normal 0i#<esc>', { buffer = args.buf })
|
||||
end,
|
||||
@@ -70,7 +70,7 @@ vim.api.nvim_create_autocmd("FileType", {
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = { 'c', 'cpp' },
|
||||
pattern = { 'c', 'cpp', 'rust' },
|
||||
callback = function(args)
|
||||
vim.keymap.set('v', '<leader>/*', '<esc>`<i/*<esc>`>i*/<esc>', { buffer = args.buf })
|
||||
end,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
package.path = package.path .. ";/home/dhanus/.config/nvim/?.lua"
|
||||
|
||||
require('settings')
|
||||
require('bindings')
|
||||
require('packconf.lazy')
|
||||
|
||||
|
||||
23
nvim/lua/plugins/init.lua
Normal file
23
nvim/lua/plugins/init.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
return {
|
||||
{
|
||||
"tpope/vim-fugitive",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
config = function()
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>tf', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>gr', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>tb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
end
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
vim.lsp.enable('rust_analyzer')
|
||||
vim.lsp.enable('clangd')
|
||||
vim.lsp.enable('lua_ls')
|
||||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float)
|
||||
end
|
||||
},
|
||||
}
|
||||
25
nvim/packconf/lazy.lua
Normal file
25
nvim/packconf/lazy.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
|
||||
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
|
||||
{ out, "WarningMsg" },
|
||||
{ "\nPress any key to exit..." },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
{import = "plugins"}
|
||||
},
|
||||
install = { colorscheme = { "habamax" } },
|
||||
checker = { enabled = true },
|
||||
})
|
||||
Reference in New Issue
Block a user