Skip to content

Commit

Permalink
feat: update neovim config
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Alex committed Mar 10, 2024
1 parent 5034d2d commit fe1b6ea
Show file tree
Hide file tree
Showing 8 changed files with 120 additions and 5 deletions.
7 changes: 2 additions & 5 deletions dotfiles/config/nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@ 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)

vim.cmd([[
set number
]])

require("lazy").setup("plugins")

1 change: 1 addition & 0 deletions dotfiles/config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"nvim-treesitter": { "branch": "master", "commit": "7ff51f53b0efb6228df2e8539b51bb2e737b77f3" },
"nvim-web-devicons": { "branch": "master", "commit": "75df79feb02d5e0ec114e447453775d4d291ea03" },
"plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "cfc3f53cfa0fbabd95bd33747288aea24fe45211" },
"telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
"vim-fugitive": { "branch": "master", "commit": "41beedabc7e948c787ea5696e04c3544c3674e23" }
}
1 change: 1 addition & 0 deletions dotfiles/config/nvim/lua/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ return {
'flake8',
'isort',
'prettierd',
'eslint_d',
'sql-formatter',
'svelte-language-server',
'typescript-language-server'
Expand Down
3 changes: 3 additions & 0 deletions dotfiles/config/nvim/lua/plugins/rainbow-delimiters.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
return {
"HiPhish/rainbow-delimiters.nvim"
}
24 changes: 24 additions & 0 deletions dotfiles/config/nvim/lua/plugins/theme.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
return {
-- add dracula
{ "Mofiqul/dracula.nvim" },

-- Configure LazyVim to load dracula
{
"LazyVim/LazyVim",
opts = {
colorscheme = "dracula",
},
},

{
'nvim-lualine/lualine.nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function()
require('lualine').setup {
options = {
theme = 'dracula-nvim'
}
}
end,
}
}
32 changes: 32 additions & 0 deletions dotfiles/config/nvim/lua/plugins/treesitter.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
config = function()
require('nvim-treesitter.configs').setup({
ensure_installed = {
"python", "lua", "javascript", "bash", "css",
"go", "graphql", "html", "json", "markdown",
"ninja", "svelte", "toml",
"vim", "yaml"
},
auto_install = false,
sync_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
matchup = {
enable = true
},
indent = {
enable = true
},
incremental_selection = {
enable = true
},
autopairs = {
enable = true
},
rainbow = {
enable = true,
extended_mode = true
}
})
end
}
6 changes: 6 additions & 0 deletions dotfiles/config/nvim/plugin/shortcuts.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Telescope
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
51 changes: 51 additions & 0 deletions dotfiles/config/nvim/plugin/vim_config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
vim.cmd([[
" Ruler and lines
set ruler
set number
set colorcolumn=80
" Spell check
set spell spelllang=en
" Spaces and indents
set softtabstop=-1
set shiftwidth=0 smarttab
set expandtab
set shiftround
set tabstop=4 softtabstop=0
set autoindent
" filetype Enable type file detection. Vim will be able to try to detect the type of file in use.
" plugin Enable plugins and load plugin for the detected file type.
" indent Load an indent file for the detected file type.
filetype plugin indent on
" Do not wrap lines. Allow long lines to extend as far as the line goes.
set nowrap
" While searching though a file incrementally highlight matching characters as you type.
set incsearch
" Ignore capital letters during search.
set ignorecase
" Override the ignorecase option if searching for capital letters.
" This will allow you to search specifically for capital letters.
set smartcase
" Do not save backup files.
set nobackup
" Use highlighting when doing a search.
set hlsearch
" Enable auto completion menu after pressing TAB.
set wildmenu
" Make wildmenu behave like similar to Bash completion.
set wildmode=list:longest
" Global config
set hidden
set ttimeoutlen=0
]])

0 comments on commit fe1b6ea

Please sign in to comment.