first commit
This commit is contained in:
16
lazy-lock.json
Normal file
16
lazy-lock.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"LuaSnip": { "branch": "master", "commit": "de1a287c9cb525ae52bc846e8f6207e5ef1da5ac" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "8f19915175395680808de529e4220da8dafc0759" },
|
||||||
|
"lsp-zero.nvim": { "branch": "v3.x", "commit": "f12d50716e8e59ea9f5cf484eac6968c33a95917" },
|
||||||
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
||||||
|
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "eadcee1573ca9d0e0cd36a49f620186a8dfdc607" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "30de5e7e9486fb1b1b8c2a1e71052b13f94f1cb0" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
|
||||||
|
"tokyonight.nvim": { "branch": "main", "commit": "b9b494fa7f7bbf2fe0747b47fa290fb7a4eddcc7" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
|
||||||
|
}
|
||||||
3
lua/teeja/init.lua
Normal file
3
lua/teeja/init.lua
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
require("teeja.set")
|
||||||
|
require("teeja.remap")
|
||||||
|
require("teeja.lazy-init")
|
||||||
17
lua/teeja/lazy-init.lua
Normal file
17
lua/teeja/lazy-init.lua
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
|
||||||
|
require("lazy").setup({
|
||||||
|
spec = "teeja.lazy",
|
||||||
|
change_detection = { notify = false }
|
||||||
|
})
|
||||||
72
lua/teeja/lazy/lsp.lua
Normal file
72
lua/teeja/lazy/lsp.lua
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'VonHeikemen/lsp-zero.nvim', branch = 'v3.x',
|
||||||
|
dependencies = {
|
||||||
|
"neovim/nvim-lspconfig",
|
||||||
|
"williamboman/mason.nvim",
|
||||||
|
"williamboman/mason-lspconfig.nvim",
|
||||||
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
|
"hrsh7th/nvim-cmp",
|
||||||
|
"hrsh7th/cmp-path",
|
||||||
|
"L3MON4D3/LuaSnip"
|
||||||
|
},
|
||||||
|
|
||||||
|
config = function()
|
||||||
|
local lsp_zero = require('lsp-zero')
|
||||||
|
lsp_zero.extend_lspconfig()
|
||||||
|
lsp_zero.on_attach(function(client, bufnr)
|
||||||
|
lsp_zero.default_keymaps({buffer = bufnr})
|
||||||
|
end)
|
||||||
|
|
||||||
|
require("mason").setup()
|
||||||
|
require("mason-lspconfig").setup {
|
||||||
|
ensure_installed = {
|
||||||
|
"lua_ls",
|
||||||
|
"bashls",
|
||||||
|
"cssls",
|
||||||
|
"cssmodules_ls",
|
||||||
|
"css_variables",
|
||||||
|
"unocss",
|
||||||
|
"html",
|
||||||
|
"dockerls",
|
||||||
|
"docker_compose_language_service",
|
||||||
|
"intelephense"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
require("mason-lspconfig").setup_handlers {
|
||||||
|
function (server_name)
|
||||||
|
require("lspconfig")[server_name].setup ({})
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
local cmp = require('cmp')
|
||||||
|
local cmp_action = lsp_zero.cmp_action()
|
||||||
|
|
||||||
|
cmp.setup({
|
||||||
|
mapping = cmp.mapping.preset.insert({
|
||||||
|
-- `Enter` key to confirm completion
|
||||||
|
['<CR>'] = cmp.mapping.confirm({select = false}),
|
||||||
|
|
||||||
|
-- Ctrl+Space to trigger completion menu
|
||||||
|
['<C-Space>'] = cmp.mapping.complete(),
|
||||||
|
|
||||||
|
-- Navigate between snippet placeholder
|
||||||
|
['<C-f>'] = cmp_action.luasnip_jump_forward(),
|
||||||
|
['<C-b>'] = cmp_action.luasnip_jump_backward(),
|
||||||
|
|
||||||
|
-- Scroll up and down in the completion documentation
|
||||||
|
['<C-u>'] = cmp.mapping.scroll_docs(-4),
|
||||||
|
['<C-d>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
}),
|
||||||
|
snippet = {
|
||||||
|
expand = function(args)
|
||||||
|
require('luasnip').lsp_expand(args.body)
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
sources = {
|
||||||
|
{ name = 'path' }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
12
lua/teeja/lazy/telescope.lua
Normal file
12
lua/teeja/lazy/telescope.lua
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'nvim-telescope/telescope.nvim', tag = '0.1.6',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||||
|
--config = function ()
|
||||||
|
-- local builtin = require('telescope.builtin')
|
||||||
|
-- vim.keymap.set('n', '<leader>sf', builtin.find_files, {})
|
||||||
|
-- vim.keymap.set('n', '<leader>sg', builtin.live_grep, {})
|
||||||
|
-- vim.keymap.set('n', '<leader>sh', builtin.help_tags, {})
|
||||||
|
--end
|
||||||
|
},
|
||||||
|
}
|
||||||
10
lua/teeja/lazy/tokyonight.lua
Normal file
10
lua/teeja/lazy/tokyonight.lua
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/tokyonight.nvim",
|
||||||
|
lazy = false,
|
||||||
|
priority = 1000,
|
||||||
|
config = function()
|
||||||
|
vim.cmd([[colorscheme tokyonight-storm]])
|
||||||
|
end
|
||||||
|
},
|
||||||
|
}
|
||||||
26
lua/teeja/lazy/treesitter.lua
Normal file
26
lua/teeja/lazy/treesitter.lua
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"nvim-treesitter/nvim-treesitter",
|
||||||
|
build = ":TSUpdate",
|
||||||
|
config = function ()
|
||||||
|
local configs = require("nvim-treesitter.configs")
|
||||||
|
configs.setup({
|
||||||
|
ensure_installed = {
|
||||||
|
"lua",
|
||||||
|
"vim",
|
||||||
|
"html",
|
||||||
|
"css",
|
||||||
|
"bash",
|
||||||
|
"json",
|
||||||
|
"php",
|
||||||
|
"dockerfile",
|
||||||
|
"yaml",
|
||||||
|
"toml"
|
||||||
|
},
|
||||||
|
sync_install = false,
|
||||||
|
highlight = { enable = true },
|
||||||
|
indent = { enable = true },
|
||||||
|
})
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
25
lua/teeja/lazy/which-key.lua
Normal file
25
lua/teeja/lazy/which-key.lua
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"folke/which-key.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
init = function()
|
||||||
|
vim.o.timeout = true
|
||||||
|
vim.o.timeoutlen = 500
|
||||||
|
end,
|
||||||
|
config = function ()
|
||||||
|
local wk = require("which-key")
|
||||||
|
wk.register({
|
||||||
|
s = {
|
||||||
|
name = "Telescope",
|
||||||
|
f = { "<cmd>Telescope find_files<cr>", "Find File" },
|
||||||
|
g = { "<cmd>Telescope live_grep<cr>", "Grep File" },
|
||||||
|
h = { "<cmd>Telescope help_tags<cr>", "Help Tags" },
|
||||||
|
},
|
||||||
|
f = {
|
||||||
|
name = "Netrw",
|
||||||
|
c = { "<cmd>Explore<cr>", "File Browser" },
|
||||||
|
},
|
||||||
|
}, { prefix = "<leader>" })
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
4
lua/teeja/remap.lua
Normal file
4
lua/teeja/remap.lua
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")
|
||||||
|
vim.keymap.set("v", "K", ":m '<-2<CR>gv=gv")
|
||||||
20
lua/teeja/set.lua
Normal file
20
lua/teeja/set.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
vim.opt.nu = true
|
||||||
|
vim.opt.relativenumber = true
|
||||||
|
|
||||||
|
vim.opt.tabstop = 4
|
||||||
|
vim.opt.softtabstop = 4
|
||||||
|
vim.opt.shiftwidth = 4
|
||||||
|
vim.opt.expandtab = true
|
||||||
|
|
||||||
|
vim.opt.smartindent = true
|
||||||
|
|
||||||
|
vim.opt.hlsearch = false
|
||||||
|
vim.opt.incsearch = true
|
||||||
|
|
||||||
|
vim.opt.termguicolors = true
|
||||||
|
|
||||||
|
vim.opt.scrolloff = 8
|
||||||
|
|
||||||
|
vim.opt.updatetime = 50
|
||||||
|
|
||||||
|
vim.opt.colorcolumn = "80"
|
||||||
Reference in New Issue
Block a user