diff options
Diffstat (limited to 'nvim')
| -rw-r--r-- | nvim/after/plugin/statusline.lua | 30 | ||||
| -rw-r--r-- | nvim/after/plugin/tabline.lua | 10 | ||||
| -rw-r--r-- | nvim/init.lua | 29 | ||||
| -rw-r--r-- | nvim/lua/colorscheme.lua | 1 | ||||
| -rw-r--r-- | nvim/lua/lsp.lua | 25 | ||||
| -rw-r--r-- | nvim/lua/plugins.lua | 103 | ||||
| -rw-r--r-- | nvim/lua/plugins/blankline.lua | 10 | ||||
| -rw-r--r-- | nvim/lua/plugins/bufferline.lua | 17 | ||||
| -rw-r--r-- | nvim/lua/plugins/colorscheme.lua | 12 | ||||
| -rw-r--r-- | nvim/lua/plugins/godot.lua | 4 | ||||
| -rw-r--r-- | nvim/lua/plugins/init.lua | 40 | ||||
| -rw-r--r-- | nvim/lua/plugins/lspzero.lua | 15 | ||||
| -rw-r--r-- | nvim/lua/plugins/lualine.lua | 36 | ||||
| -rw-r--r-- | nvim/lua/plugins/pandoc.lua | 10 | ||||
| -rw-r--r-- | nvim/lua/plugins/telescope.lua | 7 | ||||
| -rw-r--r-- | nvim/lua/plugins/treesitter.lua | 12 | ||||
| -rw-r--r-- | nvim/lua/telescope.lua | 2 |
17 files changed, 210 insertions, 153 deletions
diff --git a/nvim/after/plugin/statusline.lua b/nvim/after/plugin/statusline.lua deleted file mode 100644 index 369ad7b..0000000 --- a/nvim/after/plugin/statusline.lua +++ /dev/null @@ -1,30 +0,0 @@ -require('lualine').setup({ - options = { - theme = 'auto', - globalstatus = true, - }, - -- tabline = { - -- lualine_a = {}, - -- lualine_b = {}, - -- lualine_c = {}, - -- lualine_x = {}, - -- lualine_y = {}, - -- lualine_z = {} - -- }, - -- winbar = { - -- lualine_a = {}, - -- lualine_b = {}, - -- lualine_c = {'filename'}, - -- lualine_x = {}, - -- lualine_y = {}, - -- lualine_z = {} - -- }, - -- inactive_winbar = { - -- lualine_a = {}, - -- lualine_b = {}, - -- lualine_c = {'filename'}, - -- lualine_x = {'location'}, - -- lualine_y = {}, - -- lualine_z = {} - -- }, -}) diff --git a/nvim/after/plugin/tabline.lua b/nvim/after/plugin/tabline.lua deleted file mode 100644 index c975d94..0000000 --- a/nvim/after/plugin/tabline.lua +++ /dev/null @@ -1,10 +0,0 @@ -require('bufferline').setup({ - options = { - mode = "tabs", - show_tab_indicators = false, - hover = { - enabled = true, - delay = 200 - } - } -}) diff --git a/nvim/init.lua b/nvim/init.lua index 58e8625..3d35d32 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -4,11 +4,27 @@ HOME = os.getenv("HOME") +-- bootstrap lazynvim if not installed +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) + +-- leader +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +require("lazy").setup('plugins') require('keymap') -require('plugins') -require('colorscheme') --- require('statusline') --- require('bufferline') +require('lsp') -- General Config vim.opt.number = true @@ -45,6 +61,5 @@ vim.opt.visualbell = true -- term settings vim.opt.termguicolors = true - --- leader -vim.g.mapleader = " " +-- tex syntax highlighting +vim.g.tex_flavor = "latex" diff --git a/nvim/lua/colorscheme.lua b/nvim/lua/colorscheme.lua index 1d79a5f..e69de29 100644 --- a/nvim/lua/colorscheme.lua +++ b/nvim/lua/colorscheme.lua @@ -1 +0,0 @@ -vim.cmd("colorscheme catppuccin-mocha") diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua new file mode 100644 index 0000000..cac88ef --- /dev/null +++ b/nvim/lua/lsp.lua @@ -0,0 +1,25 @@ +local lsp = require('lsp-zero') + +lsp.preset({}) + +lsp.ensure_installed({ + 'pylsp', + 'gopls', + 'tsserver', + 'rust_analyzer' +}) + +lsp.on_attach(function(client, bufnr) + -- see :help lsp-zero-keybindings + -- to learn the available actions + lsp.default_keymaps({buffer = bufnr}) +end) + +lsp.set_preferences({ + sign_icons = { } +}) + +require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) + + +lsp.setup() diff --git a/nvim/lua/plugins.lua b/nvim/lua/plugins.lua deleted file mode 100644 index 25fb5dd..0000000 --- a/nvim/lua/plugins.lua +++ /dev/null @@ -1,103 +0,0 @@ -return require('packer').startup(function(use) - use 'wbthomason/packer.nvim' -- package manager - use 'neovim/nvim-lspconfig' -- config for lsp - - -- common dependacy - use "nvim-lua/plenary.nvim" - - -- git - use 'tpope/vim-fugitive' -- close to native git command integrations - - - use { - 'nvim-telescope/telescope.nvim', tag = '0.1.0', -- fuzzy finder - requires = { {'nvim-lua/plenary.nvim'}, {'nvim-tree/nvim-web-devicons'} } - } - - -- completion - -- TODO:config completion and setup binds - use 'hrsh7th/nvim-cmp' - use { - 'hrsh7th/cmp-nvim-lsp', - requires = { {'hrsh7th/nvim-cmp'}, {'neovim/nvim-lspconfig'} } - } - use { - 'hrsh7th/cmp-path', - requires = { 'hrsh7th/nvim-cmp' } - } - use { - 'kdheepak/cmp-latex-symbols', - requires = { 'hrsh7th/nvim-cmp' } - } - use { - 'hrsh7th/cmp-emoji', - requires = { 'hrsh7th/nvim-cmp' } - } - use { - 'hrsh7th/cmp-path', - requires = { 'hrsh7th/nvim-cmp' } - } - use { - 'L3MON4D3/LuaSnip', - tag = "v1.*", - run = "make install_jsregexp" - } - use { - 'saadparwaiz1/cmp_luasnip', - requires = { {'hrsh7th/nvim-cmp'}, {'L3MON4D3/LuaSnip'}} - } - - - -- pandoc - use 'vim-pandoc/vim-pandoc' - use 'vim-pandoc/vim-pandoc-syntax' - - -- tree sitter - use { - 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdate' - } - - use { - 'numToStr/Comment.nvim', -- faster commentting - config = function() - require('Comment').setup() - end - } - - use 'habamax/vim-godot' - - -- TODO: configure tree-sitter to color current indentation level - use { - 'lukas-reineke/indent-blankline.nvim', -- show indentation levels - config = function() - require('indent_blankline').setup { - show_current_context = true, - show_current_context_start = true - } - end - } - - -- statusline/bufferline - use { - 'nvim-lualine/lualine.nvim', -- lualine - requires = { 'nvim-tree/nvim-web-devicons', opt = true }, - config = function() - require('lualine').setup() - end - } - use { - 'akinsho/bufferline.nvim', -- bufferline - tag = "v3.*", - requires = 'nvim-tree/nvim-web-devicons', - config = function() - require('bufferline').setup() - end - } - - - -- cosmetic - use { "catppuccin/nvim", as = "catppuccin" } -- colorscheme - -- use 'kyazdani42/nvim-web-devicons' - -end) diff --git a/nvim/lua/plugins/blankline.lua b/nvim/lua/plugins/blankline.lua new file mode 100644 index 0000000..4e24f47 --- /dev/null +++ b/nvim/lua/plugins/blankline.lua @@ -0,0 +1,10 @@ +-- TODO: configure tree-sitter to color current indentation level +return { + 'lukas-reineke/indent-blankline.nvim', -- show indentation levels + dependencies = 'nvim-treesitter/nvim-treesitter', + opts = { + show_current_context = true, + show_current_context_start = true, + indent_blankline_use_treesiter = true, + } +} diff --git a/nvim/lua/plugins/bufferline.lua b/nvim/lua/plugins/bufferline.lua new file mode 100644 index 0000000..fce1b14 --- /dev/null +++ b/nvim/lua/plugins/bufferline.lua @@ -0,0 +1,17 @@ +return { + 'akinsho/bufferline.nvim', -- bufferline + version = "v4.*", + dependencies = 'nvim-tree/nvim-web-devicons', + config = function() + require('bufferline').setup({ + options = { + mode = "tabs", + show_tab_indicators = false, + hover = { + enabled = true, + delay = 200 + } + } + }) + end +} diff --git a/nvim/lua/plugins/colorscheme.lua b/nvim/lua/plugins/colorscheme.lua new file mode 100644 index 0000000..6df2325 --- /dev/null +++ b/nvim/lua/plugins/colorscheme.lua @@ -0,0 +1,12 @@ +return { + { + "catppuccin/nvim" , + name = "catpuccin", + enabled = true, + lazy = false, + priority = 1000, + config = function() + vim.cmd("colorscheme catppuccin-mocha") + end + }, +} diff --git a/nvim/lua/plugins/godot.lua b/nvim/lua/plugins/godot.lua new file mode 100644 index 0000000..79028a3 --- /dev/null +++ b/nvim/lua/plugins/godot.lua @@ -0,0 +1,4 @@ +return { + 'habamax/vim-godot', + ft = 'gdscript' +} diff --git a/nvim/lua/plugins/init.lua b/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..8628e2e --- /dev/null +++ b/nvim/lua/plugins/init.lua @@ -0,0 +1,40 @@ +return { + + -- common dependacy + "nvim-lua/plenary.nvim", + + -- git + 'tpope/vim-fugitive', -- close to native git command integrations + + + -- completion + -- TODO:config completion and setup binds + 'hrsh7th/nvim-cmp', + { + 'hrsh7th/cmp-nvim-lsp', + dependencies = { {'hrsh7th/nvim-cmp'}, {'neovim/nvim-lspconfig'} } + }, + { + 'hrsh7th/cmp-path', + dependencies = { 'hrsh7th/nvim-cmp' } + }, + { + 'kdheepak/cmp-latex-symbols', + dependencies = { 'hrsh7th/nvim-cmp' } + }, + + + + + { + 'numToStr/Comment.nvim', -- faster commentting + lazy = false, + -- config = function() + -- require('Comment').setup() + -- end + }, + + -- cosmetic + -- 'kyazdani42/nvim-web-devicons', + +} diff --git a/nvim/lua/plugins/lspzero.lua b/nvim/lua/plugins/lspzero.lua new file mode 100644 index 0000000..bc16001 --- /dev/null +++ b/nvim/lua/plugins/lspzero.lua @@ -0,0 +1,15 @@ +return { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v2.x', + dependencies = { + -- LSP Support + {'neovim/nvim-lspconfig'}, -- Required + {'williamboman/mason.nvim'}, -- Optional + {'williamboman/mason-lspconfig.nvim'}, -- Optional + + -- Autocompletion + {'hrsh7th/nvim-cmp'}, -- Required + {'hrsh7th/cmp-nvim-lsp'}, -- Required + {'L3MON4D3/LuaSnip'}, -- Required + } +} diff --git a/nvim/lua/plugins/lualine.lua b/nvim/lua/plugins/lualine.lua new file mode 100644 index 0000000..b2d4e34 --- /dev/null +++ b/nvim/lua/plugins/lualine.lua @@ -0,0 +1,36 @@ +return { + 'nvim-lualine/lualine.nvim', -- lualine + dependencies = { 'nvim-tree/nvim-web-devicons', opt = true }, + config = function() + require('lualine').setup({ + options = { + theme = 'auto', + globalstatus = true, + }, + -- tabline = { + -- lualine_a = {}, + -- lualine_b = {}, + -- lualine_c = {}, + -- lualine_x = {}, + -- lualine_y = {}, + -- lualine_z = {} + -- }, + -- winbar = { + -- lualine_a = {}, + -- lualine_b = {}, + -- lualine_c = {'filename'}, + -- lualine_x = {}, + -- lualine_y = {}, + -- lualine_z = {} + -- }, + -- inactive_winbar = { + -- lualine_a = {}, + -- lualine_b = {}, + -- lualine_c = {'filename'}, + -- lualine_x = {'location'}, + -- lualine_y = {}, + -- lualine_z = {} + -- }, + }) + end +} diff --git a/nvim/lua/plugins/pandoc.lua b/nvim/lua/plugins/pandoc.lua new file mode 100644 index 0000000..2758ada --- /dev/null +++ b/nvim/lua/plugins/pandoc.lua @@ -0,0 +1,10 @@ +return { + { + 'vim-pandoc/vim-pandoc', + ft = {"markdown", "pandoc"} + }, + { + 'vim-pandoc/vim-pandoc-syntax', + ft = {"markdown", "pandoc"} + } +} diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua new file mode 100644 index 0000000..55bc045 --- /dev/null +++ b/nvim/lua/plugins/telescope.lua @@ -0,0 +1,7 @@ +return { + 'nvim-telescope/telescope.nvim', tag = '0.1.2', -- fuzzy finder + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons' + } +} diff --git a/nvim/lua/plugins/treesitter.lua b/nvim/lua/plugins/treesitter.lua new file mode 100644 index 0000000..49ea257 --- /dev/null +++ b/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,12 @@ +return { + 'nvim-treesitter/nvim-treesitter', + build = ':TSUpdate', + opts = { + ensure_installed = { "help", "lua", "python", "java", "javascript", "typescript", "c" }, + auto_install = true, + highlight = { + enable = true, + additional_vim_regex_highlighting = false + } + } +} diff --git a/nvim/lua/telescope.lua b/nvim/lua/telescope.lua deleted file mode 100644 index 37d03a3..0000000 --- a/nvim/lua/telescope.lua +++ /dev/null @@ -1,2 +0,0 @@ --- require("telescope").setup({ --- }) |
