aboutsummaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorAlec Goncharow <alec@goncharow.dev>2024-03-27 23:51:05 -0400
committerAlec Goncharow <alec@goncharow.dev>2024-03-27 23:51:50 -0400
commita9c559f9fc070985db26e820f352395d75569eb8 (patch)
tree565c4c21c3fbd0147166a5d3195d70b085168789 /.config
parente4c0895320d09ab7238e91aefc4e7112ba577a72 (diff)
lazy, neorg, and oil
apparently packer is abandoned, neorg told me to use lazy neorg is so cool actually vim-vinegar walked so that oil could fly
Diffstat (limited to '.config')
-rw-r--r--.config/nvim/init.lua15
-rw-r--r--.config/nvim/lua/autocomplete.lua3
-rw-r--r--.config/nvim/lua/neorg_conf.lua23
-rw-r--r--.config/nvim/lua/oil_conf.lua3
-rw-r--r--.config/nvim/lua/plugins.lua182
-rw-r--r--.config/nvim/lua/treesitter.lua6
-rw-r--r--.config/sway/config5
7 files changed, 123 insertions, 114 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
diff --git a/.config/sway/config b/.config/sway/config
index b965ee7..3a4b4e3 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -29,7 +29,7 @@ floating_modifier $mod
set $my-term alacritty
bindsym $mod+Return exec --no-startup-id $my-term
bindsym $mod+t exec --no-startup-id $my-term
-bindsym $mod+n exec --no-startup-id neovide
+bindsym $mod+n exec --no-startup-id neovide '+Notes'
# kill focused window
bindsym $mod+Shift+q exec --no-startup-id ~/bin/safequit
@@ -269,13 +269,14 @@ bindsym --release XF86AudioMedia exec ~/bin/memezoom
# Sway display things
output 'LG Electronics LG ULTRAGEAR 107NTDVCR242' {
- position 2560,0
+ position 1440,640
scale 1.0
}
output 'Dell Inc. DELL P2723QE 3940MP3' {
position 0,0
scale 1.5
+ transform 270
}
output eDP-1 {