1
Fork 0

Neovim things

This commit is contained in:
Hadeed 2024-04-19 19:17:03 +05:00
parent fc87f5e7fc
commit a74c030760
7 changed files with 40 additions and 37 deletions

View file

@ -9,9 +9,10 @@ if not vim.loop.fs_stat(lazypath) then
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
"--branch=stable",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins")

View file

@ -17,6 +17,6 @@ vim.filetype.add({
vim.api.nvim_create_autocmd('Filetype', {
group = vim.api.nvim_create_augroup('setIndent', { clear = true }),
pattern = { "lua", "html" },
pattern = { "lua", "html", "css", "javascript", "javascriptreact", "typescript", "typescriptreact" },
command = 'setlocal tabstop=2 softtabstop=2 shiftwidth=2'
})

View file

@ -22,29 +22,30 @@ return {
},
{
"sakhnik/nvim-gdb",
config = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = "nvimgdb",
callback = function()
vim.opt.number = false
vim.opt.relativenumber = false
vim.opt.signcolumn = 'no'
vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
command = "startinsert"
})
end
})
end
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = "all",
highlight = {
enable = true,
additional_vim_regex_highlighting = false
},
indent = {
enable = true
}
},
main = "nvim-treesitter.configs",
build = ":TSUpdate"
},
{ "abecodes/tabout.nvim", dependencies = { "nvim-treesitter" }, config = true },
{ "abecodes/tabout.nvim", config = true },
{ "numToStr/Comment.nvim", config = true },
{ "nvim-lualine/lualine.nvim", config = true },
{ "windwp/nvim-autopairs", config = true },
"tpope/vim-fugitive",
"tpope/vim-repeat",
"tpope/vim-surround",
"tpope/vim-unimpaired",
"fladson/vim-kitty",
"tpope/vim-unimpaired"
}

View file

@ -4,12 +4,18 @@ return {
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-path"
"hrsh7th/cmp-path",
"L3MON4D3/LuaSnip"
},
config = function()
local cmp = require("cmp")
cmp.setup {
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end
},
mapping = cmp.mapping.preset.insert {
["<C-Y>"] = function(fallback)
if cmp.visible() then

View file

@ -8,6 +8,13 @@ return {
lspconfig.clangd.setup {}
local emmet_capabilities = vim.lsp.protocol.make_client_capabilities()
emmet_capabilities.textDocument.completion.completionItem.snippetSupport = true
lspconfig.emmet_ls.setup {
capabilities = emmet_capabilities,
filetypes = { "html", "javascriptreact", "typescriptreact" }
}
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = require("keymaps").lsp

View file

@ -1,15 +0,0 @@
return {
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = "all",
highlight = {
enable = true,
additional_vim_regex_highlighting = false
},
indent = {
enable = true
}
},
main = "nvim-treesitter.configs",
build = ":TSUpdate"
}

View file

@ -1,9 +1,12 @@
typeset -U path
path+="$HOME/bin"
path+="$HOME/.local/npm/bin"
export DOTS="$HOME/docs/repos/dots"
export VISUAL="nvim"
export EDITOR="nvim"
export npm_config_prefix="$HOME/.local/npm"
# vim: filetype=zsh