diff options
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/init.lua | 15 | ||||
| -rw-r--r-- | .config/nvim/lua/autocomplete.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/neorg_conf.lua | 23 | ||||
| -rw-r--r-- | .config/nvim/lua/oil_conf.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins.lua | 182 | ||||
| -rw-r--r-- | .config/nvim/lua/treesitter.lua | 6 |
6 files changed, 120 insertions, 112 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index d9b5cc6..a02b752 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -1,3 +1,16 @@ +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('plugins') require('settings') require('mappings') @@ -15,6 +28,8 @@ require('bqf_conf') require('autosession_conf') require('autoclose_conf') require('buffers') +require('oil_conf') +require('neorg_conf') -- note taking if vim.g.neovide then require('neovide_conf') diff --git a/.config/nvim/lua/autocomplete.lua b/.config/nvim/lua/autocomplete.lua index 25c0276..4ada86b 100644 --- a/.config/nvim/lua/autocomplete.lua +++ b/.config/nvim/lua/autocomplete.lua @@ -60,5 +60,6 @@ cmp.setup.cmdline(':', { { name = 'path' } }, { { name = 'cmdline' } - }) + }), + matching = { disallow_symbol_nonprefix_matching = false } }) diff --git a/.config/nvim/lua/neorg_conf.lua b/.config/nvim/lua/neorg_conf.lua new file mode 100644 index 0000000..3c8b934 --- /dev/null +++ b/.config/nvim/lua/neorg_conf.lua @@ -0,0 +1,23 @@ +require('luarocks-nvim').setup({}) +require('neorg').setup({ + load = { + ["core.defaults"] = {}, + ["core.integrations.treesitter"] = {}, + ["core.autocommands"] = {}, + ["core.concealer"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + notes = "~/notes", -- Format: <name_of_workspace> = <path_to_workspace_root> + }, + -- Automatically detect whenever we have entered a subdirectory of a workspace + autodetect = true, + default_workspace = 'notes', + open_last_workspace = false, + index = "index.norg", -- The name of the main (root) .norg file + } + } + } +}) + +vim.api.nvim_create_user_command('Notes', 'Neorg index', {}) diff --git a/.config/nvim/lua/oil_conf.lua b/.config/nvim/lua/oil_conf.lua new file mode 100644 index 0000000..51db03e --- /dev/null +++ b/.config/nvim/lua/oil_conf.lua @@ -0,0 +1,3 @@ +require("oil").setup() +-- act like vim-vinegar +vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" }) diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index fbe003f..6498770 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -1,131 +1,97 @@ --- sourced from https://github.com/arnvald/viml-to-lua/blob/main/lua/plugins.lua - -return require('packer').startup(function() - use 'wbthomason/packer.nvim' - - -- use 'morhetz/gruvbox' - -- use 'tjdevries/colorbuddy.nvim' - use 'edkolev/tmuxline.vim' - use 'romainl/vim-cool' - +return require('lazy').setup({ + -- neorg + { + "vhyrro/luarocks.nvim", + }, + { + "nvim-neorg/neorg", + dependencies = { "luarocks.nvim" }, + version = "*", -- Pin Neorg to the latest stable release + }, + 'edkolev/tmuxline.vim', + 'romainl/vim-cool', -- common - use 'tpope/vim-fugitive' -- Git commands - use { - 'nvim-lualine/lualine.nvim', - requires = { 'kyazdani42/nvim-web-devicons', opt = true } - } - use 'andymass/vim-matchup' -- matching parens and more - use 'lewis6991/gitsigns.nvim' - - - use 'RRethy/vim-illuminate' + 'kyazdani42/nvim-web-devicons', + 'tpope/vim-fugitive', -- Git commands + 'lewis6991/gitsigns.nvim', + 'nvim-lualine/lualine.nvim', + 'andymass/vim-matchup', -- matching parens and more + 'RRethy/vim-illuminate', -- better quickfix buffer - use { 'kevinhwang91/nvim-bqf', ft = 'qf', - config = function() - -- Adapt fzf's delimiter in nvim-bqf - require('bqf').setup({ - filter = { - fzf = { - extra_opts = { '--bind', 'ctrl-o:toggle-all', '--delimiter', '│' } - } - } - }) - end - } - use 'matbme/JABS.nvim' -- buffer switcher - - + 'kevinhwang91/nvim-bqf', + 'matbme/JABS.nvim', -- buffer switcher -- general dev - use 'neovim/nvim-lspconfig' - use({ - "glepnir/lspsaga.nvim", - branch = "main", - requires = { - { "nvim-tree/nvim-web-devicons" }, - --Please make sure you install markdown and markdown_inline parser - { "nvim-treesitter/nvim-treesitter" } + 'neovim/nvim-lspconfig', + { 'glepnir/lspsaga.nvim', branch = "main" }, + + 'hrsh7th/nvim-cmp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-nvim-lua', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-nvim-lsp-signature-help', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-vsnip', + 'hrsh7th/vim-vsnip', + + { 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' }, + 'scrooloose/nerdcommenter', -- commenting shortcuts + + 'tpope/vim-eunuch', -- wrappers UNIX commands + 'tpope/vim-surround', -- surround characters shortcuts + 'tpope/vim-endwise', -- wisely add + 'tpope/vim-repeat', -- repeat for plugins + -- 'tpope/vim-vinegar', -- make explore better + { + 'stevearc/oil.nvim', + opts = {}, + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, + }, + { + 'prichrd/netrw.nvim', -- particles for ^ + opts = { + directory = '', -- Directory icon + file = '', -- File icon + use_devicons = true, -- Uses nvim-web-devicons if true, otherwise use the file icon specified above + mappings = {}, -- Custom key mappings } - }) - - use 'hrsh7th/nvim-cmp' - use 'hrsh7th/cmp-buffer' - use 'hrsh7th/cmp-nvim-lua' - use 'hrsh7th/cmp-nvim-lsp' - use 'hrsh7th/cmp-nvim-lsp-signature-help' - use "hrsh7th/cmp-path" - use 'hrsh7th/cmp-vsnip' - use 'hrsh7th/vim-vsnip' - - use { 'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } - use 'scrooloose/nerdcommenter' -- commenting shortcuts - - use 'tpope/vim-eunuch' -- wrappers UNIX commands - use 'tpope/vim-surround' -- surround characters shortcuts - use 'tpope/vim-endwise' -- wisely add - use 'tpope/vim-repeat' -- repeat for plugins - use 'tpope/vim-vinegar' -- make explore better - use { - 'prichrd/netrw.nvim', -- particles for ^ - config = function() - require("netrw").setup { - directory = '', -- Directory icon - file = '', -- File icon - use_devicons = true, -- Uses nvim-web-devicons if true, otherwise use the file icon specified above - mappings = {}, -- Custom key mappings - } - end - } - - use 'kyazdani42/nvim-web-devicons' -- icons when searching - use { "ibhagwan/fzf-lua", - -- optional for icon support - requires = { "nvim-tree/nvim-web-devicons" } - } + }, + 'ibhagwan/fzf-lua', -- zig - use 'ziglang/zig.vim' - + 'ziglang/zig.vim', -- go - use 'ray-x/go.nvim' + 'ray-x/go.nvim', -- rust - use 'rust-lang/rust.vim' - use 'simrat39/rust-tools.nvim' + 'rust-lang/rust.vim', + 'simrat39/rust-tools.nvim', -- ember - use 'joukevandermaas/vim-ember-hbs' - use 'joerdav/templ.vim' + 'joukevandermaas/vim-ember-hbs', + 'joerdav/templ.vim', -- debugging - use 'nvim-lua/plenary.nvim' - use 'mfussenegger/nvim-dap' + 'nvim-lua/plenary.nvim', + 'mfussenegger/nvim-dap', -- jai - use 'rluba/jai.vim' - - use 'wsdjeg/vim-fetch' + 'rluba/jai.vim', - use { "johmsalas/text-case.nvim", - config = function() - require('textcase').setup {} - end - } + 'johmsalas/text-case.nvim', -- integer base conversions - use { - "glts/vim-radical", - requires = { - { "glts/vim-magnum" }, - } - } + 'glts/vim-radical', + 'glts/vim-magnum', - use 'tpope/vim-dadbod' -- SQL - use 'nanotee/sqls.nvim' + -- SQL + 'tpope/vim-dadbod', + 'nanotee/sqls.nvim', - use 'rmagatti/auto-session' + 'rmagatti/auto-session', -- auto close delimiters because lazy - use 'm4xshen/autoclose.nvim' + 'm4xshen/autoclose.nvim', - use 'mg979/vim-visual-multi' -end) + 'mg979/vim-visual-multi', +}) diff --git a/.config/nvim/lua/treesitter.lua b/.config/nvim/lua/treesitter.lua index 0e60da3..b4e9b9b 100644 --- a/.config/nvim/lua/treesitter.lua +++ b/.config/nvim/lua/treesitter.lua @@ -1,6 +1,6 @@ require 'nvim-treesitter.configs'.setup { -- A list of parser names, or "all" - ensure_installed = { "rust", "c", "lua", "vim", "help", "zig", "go" }, + ensure_installed = { "rust", "c", "lua", "vim", "zig", "go" }, -- Install parsers synchronously (only applied to `ensure_installed`) sync_install = false, @@ -14,9 +14,9 @@ require 'nvim-treesitter.configs'.setup { ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - highlight = { - enable = false, + enable = true, + disable = { "c", "rust", "zig", "go" }, }, matchup = { enable = true, -- mandatory, false will disable the whole extension |
