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", "clone",
"--filter=blob:none", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git", "https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release "--branch=stable",
lazypath, lazypath,
}) })
end end
vim.opt.rtp:prepend(lazypath) vim.opt.rtp:prepend(lazypath)
require("lazy").setup("plugins") require("lazy").setup("plugins")

View file

@ -17,6 +17,6 @@ vim.filetype.add({
vim.api.nvim_create_autocmd('Filetype', { vim.api.nvim_create_autocmd('Filetype', {
group = vim.api.nvim_create_augroup('setIndent', { clear = true }), 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' command = 'setlocal tabstop=2 softtabstop=2 shiftwidth=2'
}) })

View file

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

View file

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

View file

@ -8,6 +8,13 @@ return {
lspconfig.clangd.setup {} 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", { vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("UserLspConfig", {}), group = vim.api.nvim_create_augroup("UserLspConfig", {}),
callback = require("keymaps").lsp 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 typeset -U path
path+="$HOME/bin" path+="$HOME/bin"
path+="$HOME/.local/npm/bin"
export DOTS="$HOME/docs/repos/dots" export DOTS="$HOME/docs/repos/dots"
export VISUAL="nvim" export VISUAL="nvim"
export EDITOR="nvim" export EDITOR="nvim"
export npm_config_prefix="$HOME/.local/npm"
# vim: filetype=zsh # vim: filetype=zsh