diff --git a/.config/nvim b/.config/nvim new file mode 160000 index 0000000..fdf9772 --- /dev/null +++ b/.config/nvim @@ -0,0 +1 @@ +Subproject commit fdf977246da21dbc06aa6ec9fa2e2192213accf6 diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua deleted file mode 100644 index d79b525..0000000 --- a/.config/nvim/init.lua +++ /dev/null @@ -1,22 +0,0 @@ -vim.g.loaded_netrw = 1 -vim.g.loaded_netrwPlugin = 1 - -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('lazy').setup({ { import = "plugins" } }) - -require("sets") -require("remaps") - -vim.notify("starting nvim 🏕️") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json deleted file mode 100644 index b185a12..0000000 --- a/.config/nvim/lazy-lock.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "barbar.nvim": { "branch": "master", "commit": "a8fe0abe538f15997a543e0f653993ef3727455f" }, - "fd": { "branch": "master", "commit": "00b64f3ccbfb832ef744bb42bbdfabaf929b5ee2" }, - "feline.nvim": { "branch": "main", "commit": "a6bebd903e84d5ce0e97c597e0ca85cd24109002" }, - "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" }, - "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, - "nvim": { "branch": "main", "commit": "079500a625f3ae5aa6efb758f1a17fe4c7a57e52" }, - "nvim-lspconfig": { "branch": "master", "commit": "e50a8fcd6267cb9b2d2a880dcf3a8ac113b75abc" }, - "nvim-treesitter": { "branch": "master", "commit": "25ddfde8d7167d7d81403d6809242439037d2b68" }, - "nvim-web-devicons": { "branch": "master", "commit": "a1425903ab52a0a0460622519e827f224e5b4fee" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, - "ripgrep": { "branch": "master", "commit": "3f2fe0afee0d1a1eeb3235904cfef4f35c4644dc" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "undotree": { "branch": "master", "commit": "36ff7abb6b60980338344982ad4cdf03f7961ecd" } -} \ No newline at end of file diff --git a/.config/nvim/lua/plugins/barbar.lua b/.config/nvim/lua/plugins/barbar.lua deleted file mode 100644 index 2cc89d6..0000000 --- a/.config/nvim/lua/plugins/barbar.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { 'romgrk/barbar.nvim', - dependencies = { - 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status - 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons - }, - init = function() vim.g.barbar_auto_setup = false end, - opts = { - -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: - -- animation = true, - -- insert_at_start = true, - -- …etc. - }, -} diff --git a/.config/nvim/lua/plugins/catppuccin.lua b/.config/nvim/lua/plugins/catppuccin.lua deleted file mode 100644 index a2e2668..0000000 --- a/.config/nvim/lua/plugins/catppuccin.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { { - "catppuccin/nvim", - priority = 1000, - config = function() - require("catppuccin").setup({ - flavour = "mocha", - integrations = { - treesitter = false, - }, - }) - vim.cmd.colorscheme("catppuccin") - end -} } diff --git a/.config/nvim/lua/plugins/feline.lua b/.config/nvim/lua/plugins/feline.lua deleted file mode 100644 index 36ac3c8..0000000 --- a/.config/nvim/lua/plugins/feline.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - 'freddiehaddad/feline.nvim', - opts = {}, - config = function(_, opts) - require('feline').setup() - -- require('feline').winbar.setup() -- to use winbar - require('feline').statuscolumn.setup() -- to use statuscolumn - - -- require('feline').use_theme() -- to use a custom theme - end -} diff --git a/.config/nvim/lua/plugins/gitsigns.lua b/.config/nvim/lua/plugins/gitsigns.lua deleted file mode 100644 index 3adbda8..0000000 --- a/.config/nvim/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - "lewis6991/gitsigns.nvim", - config = function() - require("gitsigns").setup({ - current_line_blame = true, - yadm = { - enable = true, - }, - }) - end -} diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua deleted file mode 100644 index f8152e7..0000000 --- a/.config/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,58 +0,0 @@ -vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(ev) - -- Enable completion triggered by - vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' - - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = { buffer = ev.buf } - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) - vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) - vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) - vim.keymap.set('n', 'f', function() - vim.lsp.buf.format { async = true } - end, opts) - end, -}) - -return { - "neovim/nvim-lspconfig", - config = function() - local lspconfig = require("lspconfig") - - lspconfig.pyright.setup({}) - - lspconfig.rust_analyzer.setup({}) - - lspconfig.lua_ls.setup({ - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = "LuaJIT", - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - }, - }) - end -} diff --git a/.config/nvim/lua/plugins/neo-tree.lua b/.config/nvim/lua/plugins/neo-tree.lua deleted file mode 100644 index b547928..0000000 --- a/.config/nvim/lua/plugins/neo-tree.lua +++ /dev/null @@ -1,32 +0,0 @@ --- TODO: set keymaps - -return { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", - dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", - -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information - }, - lazy = false, - config = function() - require('neo-tree').setup({ - filesystem = { - filtered_items = { - visible = true, - }, - }, - window = { - position = "right", - width = 30, - }, - }) - end, - keys = { - { "t", "Neotree toggle", "Toggle Neotree" }, - { "f", "Neotree filesystem focus", "Focus filesystem in Neotree" }, - { "b", "Neotree buffers focus", "Focus buffers in Neotree" }, - { "g", "Neotree git_status focus", "Focus git status in Neotree" }, - }, -} diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua deleted file mode 100644 index f1f63b7..0000000 --- a/.config/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - "nvim-telescope/telescope.nvim", - branch = "0.1.x", - dependencies = { - "BurntSushi/ripgrep", - "nvim-lua/plenary.nvim", - "sharkdp/fd", - "nvim-treesitter/nvim-treesitter", - "nvim-tree/nvim-web-devicons", - }, - keys = { - { "f", "Telescope find_files", desc = "Fuzzy find files with Telescope" }, - { "", "Telescope find_files", desc = "Fuzzy find files with Telescope" }, - { "b", "Telescope buffers", desc = "Fuzzy find open buffers with Telescope" }, - } -} diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 210677f..0000000 --- a/.config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - config = function() - require('nvim-treesitter.configs').setup({ - modules = {}, - ensure_installed = { "lua", "rust" }, - sync_install = false, - auto_install = true, - highlight = { - enable = true, - additional_vim_regex_highlighting = false, - }, - ignore_install = {}, - }) - end -} diff --git a/.config/nvim/lua/plugins/undotree.lua b/.config/nvim/lua/plugins/undotree.lua deleted file mode 100644 index 90aa1b9..0000000 --- a/.config/nvim/lua/plugins/undotree.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - "mbbill/undotree", - keys = { - { - "", - function() - vim.cmd.UndotreeToggle(); - vim.cmd.UndotreeFocus(); - end - }, - }, -} diff --git a/.config/nvim/lua/remaps.lua b/.config/nvim/lua/remaps.lua deleted file mode 100644 index 3c9fd6f..0000000 --- a/.config/nvim/lua/remaps.lua +++ /dev/null @@ -1,12 +0,0 @@ --- move selected lines and auto indent - -vim.keymap.set("v", "", ":m '>+1gv=gv") -vim.keymap.set("v", "", ":m '<-2gv=gv") - --- zz centers the cursor - -vim.keymap.set("n", "", "zz") -vim.keymap.set("n", "", "zz") - -vim.keymap.set("n", "n", "nzzzv") -vim.keymap.set("n", "N", "Nzzzv") diff --git a/.config/nvim/lua/sets.lua b/.config/nvim/lua/sets.lua deleted file mode 100644 index f467a90..0000000 --- a/.config/nvim/lua/sets.lua +++ /dev/null @@ -1,39 +0,0 @@ --- line numbers - -vim.o.number = true -vim.o.relativenumber = true - --- show hidden characters -vim.opt.list = true -vim.opt.listchars = { tab = '→ ', trail = '·' } - --- indentation -vim.opt.expandtab = true -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 -vim.opt.smartindent = true - --- line wrapping -vim.opt.wrap = false - --- undo history -vim.opt.swapfile = false -vim.opt.backup = false -vim.opt.undodir = os.getenv("HOME") .. "/.local/state/nvim/undodir" -vim.opt.undofile = true -vim.opt.updatetime = 50 - --- end search when exiting -vim.opt.hlsearch = false -vim.opt.incsearch = true - --- stuff - -vim.opt.fillchars:append({ eob = ' ' }) - -vim.opt.termguicolors = true - -vim.opt.scrolloff = 8 - -vim.opt.colorcolumn = "80" diff --git a/.config/nvim/stylua.toml b/.config/nvim/stylua.toml deleted file mode 100644 index f7eadb0..0000000 --- a/.config/nvim/stylua.toml +++ /dev/null @@ -1,4 +0,0 @@ -indent_type = "Spaces" -indent_width = 4 -column_width = 120 -quote_style = "ForceDouble" diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..43bee6b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule ".config/nvim/.config/nvim"] + path = .config/nvim/.config/nvim + url = git@github.com:kalmenn/yadm-dotfiles-nvim.git +[submodule ".config/nvim"] + path = .config/nvim + url = git@github.com:kalmenn/yadm-dotfiles-nvim.git