diff --git a/ghostty/config b/ghostty/config index 4de7614..d241d49 100644 --- a/ghostty/config +++ b/ghostty/config @@ -10,7 +10,9 @@ # on Ghostty's website, at https://ghostty.org/docs/config. font-family = JetBrainsMono NFM Medium -theme = Catppuccin Macchiato +theme = Catppuccin Frappe +# theme = dark:Catppuccin Frappe,light:Catppuccin Latte + background-opacity = 0.95 @@ -18,4 +20,3 @@ window-width = 160 window-height = 45 window-padding-x = 4 window-padding-y = 4 - diff --git a/nvim/.luarc.json b/nvim/.luarc.json deleted file mode 100644 index eaf7284..0000000 --- a/nvim/.luarc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "diagnostics.globals": [ - ] -} diff --git a/nvim/after/lsp/lua_ls.lua b/nvim/after/lsp/lua_ls.lua new file mode 100644 index 0000000..873ce58 --- /dev/null +++ b/nvim/after/lsp/lua_ls.lua @@ -0,0 +1,18 @@ +return { + settings = { + Lua = { + runtime = { version = 'LuaJIT' }, + diagnostics = { + globals = { 'vim' }, + }, + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME, + '${3rd}/luv/library', + }, + }, + telemetry = { enable = false }, + }, + }, +} diff --git a/nvim/init.lua b/nvim/init.lua index 14398bb..29fc47a 100644 --- a/nvim/init.lua +++ b/nvim/init.lua @@ -4,9 +4,10 @@ -- neovim standard paths: -- https://neovim.io/doc/user/starting.html#standard-path -if vim.fn.has("nvim-0.11.0") == 0 then +local minVer = '0.12.0' +if vim.fn.has("nvim-" .. minVer) == 0 then vim.api.nvim_echo({ - { "This nvim config requires neovim >= 0.11.0\n", "ErrorMsg" }, + { "This nvim config requires neovim >= " .. minVer .. "\n", "ErrorMsg" }, { "Press any key to exit", "MoreMsg" }, }, true, {}) vim.fn.getchar() @@ -14,10 +15,14 @@ if vim.fn.has("nvim-0.11.0") == 0 then return {} end -require('options') -require('keymaps') -require('autocmds') -require('lazy-nvim') -require('lsp-config') +require('vim._core.ui2').enable() + +-- set leader before loading plugins +vim.g.mapleader = ' ' +vim.g.maplocalleader = ' ' + +require("options") +require("pack") +require("lsp") +require("commands") -vim.cmd[[ colorscheme catppuccin-macchiato ]] diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json deleted file mode 100644 index 9159baf..0000000 --- a/nvim/lazy-lock.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "catppuccin": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, - "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, - "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "nordtheme": { "branch": "main", "commit": "f13f5dfbb784deddbc1d8195f34dfd9ec73e2295" }, - "nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" }, - "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, - "oil.nvim": { "branch": "master", "commit": "ab887d926c2665a708fbe9e6c4654042cc5f4c60" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, - "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, - "vim-commentary": { "branch": "master", "commit": "64a654ef4a20db1727938338310209b6a63f60c9" }, - "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, - "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, - "vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } -} diff --git a/nvim/lua/autocmds.lua b/nvim/lua/autocmds.lua deleted file mode 100644 index dd18a5f..0000000 --- a/nvim/lua/autocmds.lua +++ /dev/null @@ -1,9 +0,0 @@ -local api = vim.api - -api.nvim_create_augroup("custom_buffer", { clear = true }) -api.nvim_create_autocmd("TextYankPost", { - group = "custom_buffer", - pattern = "*", - callback = function() vim.highlight.on_yank { timeout = 200 } end -}) - diff --git a/nvim/lua/commands.lua b/nvim/lua/commands.lua new file mode 100644 index 0000000..eaa7327 --- /dev/null +++ b/nvim/lua/commands.lua @@ -0,0 +1,40 @@ +local api = vim.api +local opt = vim.opt + +local augroup = api.nvim_create_augroup("user.commands", { clear = true }) + +api.nvim_create_autocmd("TextYankPost", { + group = augroup, + pattern = "*", + desc = "Highlight when yanking (copying) text", + callback = function() + vim.hl.on_yank() + end, +}) + +api.nvim_create_autocmd("WinEnter", { + group = augroup, + pattern = "*", + callback = function() + local function count_non_floating_wins() + local count = 0 + for _, win in ipairs(api.nvim_tabpage_list_wins(0)) do + local cfg = api.nvim_win_get_config(win) + if cfg.relative == "" then -- Empty means it's not floating + count = count + 1 + end + end + return count + end + + local locWins = count_non_floating_wins() + if locWins > 1 then + opt.winbar = "%f %m" + else + opt.winbar = "" + end + end +}) + + + diff --git a/nvim/lua/keymaps.lua b/nvim/lua/keymaps.lua deleted file mode 100644 index c2a7f62..0000000 --- a/nvim/lua/keymaps.lua +++ /dev/null @@ -1,31 +0,0 @@ --- neovim init file --- github.com/davidjenni/dotfiles - -local k = vim.keymap - -k.set('n', 'h', 'noh', { desc = 'Clear highlights' }) -k.set('n', '', ':wincmd k', { desc = 'Move to window above' }) -k.set('n', '', ':wincmd j', { desc = 'Move to window below' }) -k.set('n', '', ':wincmd h', { desc = 'Move to window left' }) -k.set('n', '', ':wincmd l', { desc = 'Move to window right' }) - --- plugins set their own keymaps in ~/.config/nvim/lua/plugins/*.lua --- --- -k.set("n", "-", "Oil", { desc = "Open parent directory" }) - -k.set("n", "fp", "echo expand('%:p')", { desc = "Show full path of current buffer"}) - -local nvimTreeFocusOrToggle = function () - local nvimTree=require("nvim-tree.api") - local currentBuf = vim.api.nvim_get_current_buf() - local currentBufFt = vim.api.nvim_get_option_value("filetype", { buf = currentBuf }) - if currentBufFt == "NvimTree" then - nvimTree.tree.toggle() - else - nvimTree.tree.focus() - end -end - - -vim.keymap.set("n", "e", nvimTreeFocusOrToggle, { desc = "Toggle tree explorer"}) diff --git a/nvim/lua/lazy-nvim.lua b/nvim/lua/lazy-nvim.lua deleted file mode 100644 index 6bcc67a..0000000 --- a/nvim/lua/lazy-nvim.lua +++ /dev/null @@ -1,26 +0,0 @@ --- neovim init file --- github.com/davidjenni/dotfiles - -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - print('Bootstrapping lazy.nvim into: ' .. lazypath .. '...') - 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) - -local opts = { - install = { - colorscheme = { "catppuccin-macchiato" }, - }, -} - --- merge and load all .lua files under lua/plugins, see: --- https://github.com/folke/lazy.nvim#-structuring-your-plugins -require("lazy").setup("plugins", opts) diff --git a/nvim/lua/lsp-config.lua b/nvim/lua/lsp-config.lua deleted file mode 100644 index 4a3db72..0000000 --- a/nvim/lua/lsp-config.lua +++ /dev/null @@ -1,37 +0,0 @@ -local lsp = vim.lsp - --- https://neovim.io/doc/user/lsp.html#_config -vim.lsp.config['luals'] = { - cmd = { 'lua-language-server' }, - filetypes = { 'lua' }, - root_markers = { '.luarc.json', '.luarc.jsonc' }, - settings = { - Lua = { - runtime = { - version = 'LuaJIT', - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = { - vim.env.VIMRUNTIME, - "${3rd}/luv/library", - } - -- much slower, but more complete - -- library = vim.api.nvim_get_runtime_file("", true), - }, - }, - } -} - -lsp.enable('luals') - --- use neovim's built-in LSP auto-completion (neovim >= 0.11.0) --- https://neovim.io/doc/user/lsp.html#_quickstart -vim.api.nvim_create_autocmd('LspAttach', { - callback = function(ev) - local client = vim.lsp.get_client_by_id(ev.data.client_id) - if client:supports_method('textDocument/completion') then - vim.lsp.completion.enable(true, client.id, ev.buf, { autotrigger = true }) - end - end, -}) diff --git a/nvim/lua/lsp.lua b/nvim/lua/lsp.lua new file mode 100644 index 0000000..abefc82 --- /dev/null +++ b/nvim/lua/lsp.lua @@ -0,0 +1,120 @@ +local cmd = vim.cmd +local set = vim.keymap.set +local diag = vim.diagnostic + +-- diagnostics: +diag.config({ + -- float = { + -- border = 'rounded', + -- source = 'if_many', + -- }, + severity_sort = true, + virtual_text = { + prefix = '●', + source = 'if_many', + spacing = 6, + }, + signs = { + active = true, + text = { + [vim.diagnostic.severity.ERROR] = "󰅚", -- icon for error + [vim.diagnostic.severity.WARN] = "󰀪", -- icon for warning + [vim.diagnostic.severity.INFO] = "󰋽", -- icon for info + [vim.diagnostic.severity.HINT] = "󰌶", -- icon for hint + }, + }, +}) + +require('mason-lspconfig').setup({ + ensure_installed = { 'jsonls', 'lua_ls', 'roslyn_ls', 'rust_analyzer' }, +}) +-- local toolsToInstall = { 'stylua' } +local toolsToInstall = { } +for _, tool in ipairs(toolsToInstall) do + if vim.fn.executable(tool) == 0 then + cmd([[MasonInstall ]] .. tool) + end +end + +set("n", "q", function() + diag.setloclist({ open = true }) +end, { desc = "Open diagnostic list" }) + +vim.lsp.enable({ 'jsonls', 'lua_ls' }) + +vim.o.autocomplete = false + +vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('my.lsp', {}), + callback = function(ev) + local client = assert(vim.lsp.get_client_by_id(ev.data.client_id)) + -- if client:supports_method('textDocument/implementation') then + -- -- Create a keymap for vim.lsp.buf.implementation ... + -- end + + if client:supports_method('textDocument/completion') then + vim.lsp.completion.enable(true, client.id, ev.buf, {autotrigger = false}) + + local function feedkeys(keys) + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(keys, true, false, true), 'n', true) + end + + local function pumvisible() + return tonumber(vim.fn.pumvisible()) ~= 0 + end + + -- vim.lsp.handlers["textDocument/hover"] = function(_, _, _, config) + -- config = config or {} + -- config.border = 'rounded' + -- vim.lsp.buf.signature_help( { config }) + -- end + set("i", "", function() vim.lsp.completion.get() end, { desc = 'Start completion popup menu'}) + + set('i', '', function() + if pumvisible() then feedkeys '' else feedkeys '' end + end, { desc = 'Accept current selected completion' }) + + set('i', '/', function() + if pumvisible() then feedkeys '' else feedkeys '/' end + end, { desc = 'Dismiss completion menu' }) + + -- LSP key mappings: + set('i', '', '', { desc = 'Buffer completions' }) + + set({ 'i', 's' }, '', function() + if pumvisible() then + feedkeys '' + elseif vim.snippet.active { direction = 1 } then + vim.snippet.jump(1) + else + feedkeys '' + end + end, { desc = 'Select next completion' }) + + set({ 'i', 's' }, '', function() + if pumvisible() then + feedkeys '' + elseif vim.snippet.active { direction = -1 } then + vim.snippet.jump(-1) + else + feedkeys '' + end + end, { desc = 'Select previous completion' }) + + -- Inside a snippet, use backspace to remove the placeholder. + set('s', '', 's', { desc = 'Remove snippet placeholder' }) + end + + -- Auto-format ("lint") on save. + -- if not client:supports_method('textDocument/willSaveWaitUntil') + -- and client:supports_method('textDocument/formatting') then + -- vim.api.nvim_create_autocmd('BufWritePre', { + -- group = vim.api.nvim_create_augroup('my.lsp', {clear=false}), + -- buffer = ev.buf, + -- callback = function() + -- vim.lsp.buf.format({ bufnr = ev.buf, id = client.id, timeout_ms = 1000 }) + -- end, + -- }) + -- end + end, +}) diff --git a/nvim/lua/options.lua b/nvim/lua/options.lua index 257d75f..de5ae5b 100644 --- a/nvim/lua/options.lua +++ b/nvim/lua/options.lua @@ -1,77 +1,32 @@ --- neovim init file --- github.com/davidjenni/dotfiles +local o = vim.o + +o.cursorline = true +o.smarttab = true +o.expandtab = true +o.incsearch = true +o.ignorecase = true +o.smartcase = true +o.number = true +o.signcolumn = 'yes:2' +o.scrolloff = 10 +o.sidescrolloff = 4 +o.splitbelow = true +o.splitright = true +o.pumborder = 'rounded' +o.winborder = 'rounded' +o.list = true +o.listchars = 'tab:>.,trail:#,extends:>,precedes:<' +o.showmatch = true +o.matchtime = 2 -local g, opt = vim.g, vim.opt - --- nvim-tree: disable netrw at the very start of your init.lua -g.loaded_netrw = 1 -g.loaded_netrwPlugin = 1 - -g.mapleader = ' ' -g.maplocalleader = ' ' - --- :he options -opt.backspace = 'indent,eol,start' -opt.showcmd = true -opt.laststatus = 3 -- new in neovim >= 0.7 --- TODO: :hightlight WinSeparator guibg=None - -opt.autowrite = true -opt.autoread = true -opt.cursorline = true - -opt.wildmode = { 'list', 'full' } --- opt.wildmode = { 'list:full' } -opt.wildignorecase = true -opt.wildoptions = 'pum' -opt.pumheight = 12 - -opt.showmode = true -opt.showcmd = true -opt.showmatch = true - -opt.number = true -opt.signcolumn = 'yes' -opt.shortmess = 'atToOcI' -opt.splitright = true -opt.splitbelow = true - -opt.smarttab = true -opt.expandtab = true local indent = 2 -opt.tabstop = indent -opt.softtabstop = indent -opt.shiftwidth = indent -opt.autoindent = true -opt.smartindent = true -opt.shiftround = true -opt.cindent = true -opt.virtualedit = 'onemore' -opt.joinspaces = false -opt.formatoptions = 'crqnj' - -opt.completeopt = 'menuone,preview' - -opt.incsearch = true -opt.ignorecase = true -opt.smartcase = true - -opt.cursorline = true -opt.scrolloff = 2 -opt.sidescrolloff = 2 - -opt.listchars = { tab = '>.', trail = '#', extends = '>', precedes = '<' } -opt.list = true - -opt.mouse = 'a' -opt.belloff = 'all' --- no automatic copy to system clipboard -opt.clipboard = '' -opt.writebackup = false -opt.swapfile = false -opt.hidden = true -opt.switchbuf = 'useopen' - --- disable folding; see also `set nofoldenable` -opt.foldlevel = 99 +o.tabstop = indent +o.softtabstop = indent +o.shiftwidth = indent +o.completeopt = 'menuone,noselect,fuzzy,popup' +o.mouse = 'a' + +o.swapfile = false +o.backup = false +o.undodir = vim.fn.stdpath("data") .. "/undodir" diff --git a/nvim/lua/pack.lua b/nvim/lua/pack.lua new file mode 100644 index 0000000..631b96f --- /dev/null +++ b/nvim/lua/pack.lua @@ -0,0 +1,119 @@ +vim.pack.add({ + { src="https://github.com/catppuccin/nvim", name = "catppuccin" }, + 'https://github.com/j-hui/fidget.nvim', + 'https://github.com/neovim/nvim-lspconfig', + 'https://github.com/nvim-mini/mini.nvim', + 'https://github.com/nvim-lualine/lualine.nvim', + -- 'https://github.com/seblyng/roslyn.nvim', + 'https://github.com/stevearc/oil.nvim', + 'https://github.com/williamboman/mason.nvim', + 'https://github.com/williamboman/mason-lspconfig.nvim', +}, { confirm = false }) + +local cmd = vim.cmd +local set = vim.keymap.set + +require("catppuccin").setup({ + flavour = "frappe", + transparent_background = true, + custom_highlights = function(colors) + local sepColor = colors.mauve + return { + WinSeparator = { fg = sepColor }, + VertSplit = { fg = sepColor }, + } + end +}) +cmd.colorscheme('catppuccin') + +-- nicer notifications: +require('fidget').setup({ + display = { + done_ttl = 15, + }, + notification = { + override_vim_notify = true, + }, +}) + +require('mini.icons').setup() + +require("lualine").setup({ + options = { + theme = "auto", + globalstatus = true, + component_separators = { left = "|", right = "|" }, + section_separators = { left = "", right = "" }, + }, + sections = { + lualine_a = { "mode" }, + lualine_b = { "branch", "diff", "diagnostics" }, + lualine_c = { "filename", "filesize" }, + lualine_x = { "encoding", "fileformat", "filetype" }, + lualine_y = { "progress", "searchcount", "lsp_status" }, + lualine_z = { "location", '%B' }, + }, + tabline = {}, +}) + +require('mini.cmdline').setup() + +local win_config = function() + local height = math.floor(0.618 * vim.o.lines) + local width = math.floor(0.618 * vim.o.columns) + return { + anchor = 'NW', height = height, width = width, + row = math.floor(0.5 * (vim.o.lines - height)), + col = math.floor(0.5 * (vim.o.columns - width)), + } +end +local _miniPick = require("mini.pick") +_miniPick.setup( + -- Centered on screen + { + window = { config = win_config }, + mappings = { + move_down = '', + move_up = '', + } + } +) +set("n", "b", function() _miniPick.builtin.buffers() end, { desc = "Buffer picker" }) +set("n", "f", function() _miniPick.builtin.files() end, { desc = "Files picker" }) +set("n", "h", function() _miniPick.builtin.help() end, { desc = "Help picker" }) +set("n", "/", function() _miniPick.builtin.grep_live() end, { desc = "Live grep" }) + +require("oil").setup({ + columns = { "icons", "size", "mtime" }, + keymaps = { + [""] = { "actions.close", mode = "n" }, + }, + view_options = { + sort = { + { "type", "asc" }, + { "name", "asc" }, + } + }, + float = { + max_width = 0.6, + max_height = 0.4, + }, +}) +set("n", "-", "Oil --float", { desc = "Toggle floating Oil file explorer" }) + +require('mason').setup() + +require('mini.surround').setup({ + -- retain muscle memory from tpope's vim-surround + mappings = { + add = 'ys', + delete = 'ds', + find = '', + find_left = '', + highlight = '', + replace = 'cs', + suffix_last = '', + suffix_next = '', + }, +}) + diff --git a/nvim/lua/plugins/basics.lua b/nvim/lua/plugins/basics.lua deleted file mode 100644 index f7a14e5..0000000 --- a/nvim/lua/plugins/basics.lua +++ /dev/null @@ -1,7 +0,0 @@ - return { - 'tpope/vim-commentary', - 'tpope/vim-fugitive', - 'tpope/vim-surround', - 'tpope/vim-unimpaired', - { 'nvim-tree/nvim-web-devicons', lazy = true, }, - } diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/lua/plugins/gitsigns.lua deleted file mode 100644 index 96ef2ce..0000000 --- a/nvim/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,14 +0,0 @@ -return { - 'lewis6991/gitsigns.nvim', - event = { "BufReadPre", "BufNewFile" }, - opts = { - signs = { - add = { text = "▎" }, - change = { text = "▎" }, - delete = { text = "" }, - topdelete = { text = "" }, - changedelete = { text = "▎" }, - untracked = { text = "▎" }, - }, - }, - } diff --git a/nvim/lua/plugins/lazydev.lua b/nvim/lua/plugins/lazydev.lua deleted file mode 100644 index 1f1b5e9..0000000 --- a/nvim/lua/plugins/lazydev.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - { - "folke/lazydev.nvim", - ft = "lua", -- only load on lua files - opts = { - library = { - -- See the configuration section for more details - -- Load luvit types when the `vim.uv` word is found - { path = "${3rd}/luv/library", words = { "vim%.uv" } }, - }, - }, - }, -} \ No newline at end of file diff --git a/nvim/lua/plugins/lsp.lua b/nvim/lua/plugins/lsp.lua deleted file mode 100644 index 2af58cb..0000000 --- a/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,25 +0,0 @@ - -return { - { - "williamboman/mason.nvim", - config = function() - require("mason").setup() - end - }, - - { - "williamboman/mason-lspconfig.nvim", - config = function() - require("mason-lspconfig").setup({ - ensure_installed = { "lua_ls" }, - }) - end - }, - - { - "j-hui/fidget.nvim", - config = function() - require("fidget").setup({}) - end - } -} diff --git a/nvim/lua/plugins/lualine.lua b/nvim/lua/plugins/lualine.lua deleted file mode 100644 index 1b08631..0000000 --- a/nvim/lua/plugins/lualine.lua +++ /dev/null @@ -1,28 +0,0 @@ -local config = function() - require("lualine").setup({ - options = { - theme = "auto", - globalstatus = true, - component_separators = { left = "|", right = "|" }, - section_separators = { left = "", right = "" }, - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "branch", "diff", "diagnostics" }, - lualine_c = { "filename", "buffers" }, - lualine_x = { "encoding", "fileformat", "filetype" }, - lualine_y = { "progress" }, - lualine_z = { "location", '%B' }, - }, - tabline = {}, - }) -end - -return { - "nvim-lualine/lualine.nvim", - dependencies = { - 'nvim-tree/nvim-web-devicons' - }, - lazy = false, - config = config, -} diff --git a/nvim/lua/plugins/nvim-tree.lua b/nvim/lua/plugins/nvim-tree.lua deleted file mode 100644 index b4c3fb1..0000000 --- a/nvim/lua/plugins/nvim-tree.lua +++ /dev/null @@ -1,41 +0,0 @@ -return { - "nvim-tree/nvim-tree.lua", - version = "*", - lazy = "false", - dependencies = { - "nvim-tree/nvim-web-devicons", - }, - config = function() - local HEIGHT_RATIO = 0.8 -- You can change this - local WIDTH_RATIO = 0.5 - require("nvim-tree").setup({ - view = { - float = { - enable = true, - open_win_config = function() - local screen_w = vim.opt.columns:get() - local screen_h = vim.opt.lines:get() - vim.opt.cmdheight:get() - local window_w = screen_w * WIDTH_RATIO - local window_h = screen_h * HEIGHT_RATIO - local window_w_int = math.floor(window_w) - local window_h_int = math.floor(window_h) - local center_x = (screen_w - window_w) / 2 - local center_y = ((vim.opt.lines:get() - window_h) / 2) - - vim.opt.cmdheight:get() - return { - border = 'rounded', - relative = 'editor', - row = center_y, - col = center_x, - width = window_w_int, - height = window_h_int, - } - end, - }, - width = function() - return math.floor(vim.opt.columns:get() * WIDTH_RATIO) - end, - }, - }) - end -} diff --git a/nvim/lua/plugins/oil.lua b/nvim/lua/plugins/oil.lua deleted file mode 100644 index 4099c3d..0000000 --- a/nvim/lua/plugins/oil.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'stevearc/oil.nvim', - opts = {}, - -- Optional dependencies - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - require("oil").setup() - end, -} diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua deleted file mode 100644 index b70d997..0000000 --- a/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,68 +0,0 @@ -return { - { - 'nvim-telescope/telescope.nvim', tag = '0.1.5', - dependencies = { 'nvim-lua/plenary.nvim' }, - lazy = false, - cmd = 'Telescope', - keys = { - { ",", "Telescope buffers show_all_buffers=true", desc = "Switch Buffer" }, - { "/", "Telescope live_grep", desc = "Grep (root dir)" }, - { ":", "Telescope command_history", desc = "Command History" }, - { "", "Telescope find_files", desc = "Find Files (root dir)" }, - { "fr", "Telescope oldfiles", desc = "Recent" }, - - { "h", "Telescope help_tags", desc = "Help Pages" }, - - -- git - { "gc", "Telescope git_commits", desc = "commits" }, - { "gs", "Telescope git_status", desc = "status" }, - - -- search - { "sa", "Telescope autocommands", desc = "Auto Commands" }, - { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, - { "sC", "Telescope colorscheme", { enable_preview = true }, desc = "Color schemes" }, - { "sc", "Telescope command_history", desc = "Command History" }, - { "sC", "Telescope commands", desc = "Commands" }, - { "sd", "Telescope diagnostics bufnr=0", desc = "Document diagnostics" }, - { "sD", "Telescope diagnostics", desc = "Workspace diagnostics" }, - { "sh", "Telescope help_tags", desc = "Help Pages" }, - { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, - { "sk", "Telescope keymaps", desc = "Key Maps" }, - { "sM", "Telescope man_pages", desc = "Man Pages" }, - { "sm", "Telescope marks", desc = "Jump to Mark" }, - { "so", "Telescope vim_options", desc = "Options" }, - { "sR", "Telescope resume", desc = "Resume" }, - }, - }, - { - "nvim-telescope/telescope-ui-select.nvim", - config = function() - local telescope = require("telescope") - telescope.setup({ - extensions = { - ["ui-select"] = { - require("telescope.themes").get_dropdown { - -- even more opts - } - - -- pseudo code / specification for writing custom displays, like the one - -- for "codeactions" - -- specific_opts = { - -- [kind] = { - -- make_indexed = function(items) -> indexed_items, width, - -- make_displayer = function(widths) -> displayer - -- make_display = function(displayer) -> function(e) - -- make_ordinal = function(e) -> string - -- }, - -- -- for example to disable the custom builtin "codeactions" display - -- do the following - -- codeactions = false, - -- } - } - } - }) - - require("telescope").load_extension("ui-select") - end - }, -} diff --git a/nvim/lua/plugins/themes.lua b/nvim/lua/plugins/themes.lua deleted file mode 100644 index eafc8c7..0000000 --- a/nvim/lua/plugins/themes.lua +++ /dev/null @@ -1,23 +0,0 @@ --- neovim init file --- github.com/davidjenni/dotfiles - -return { - { - "folke/tokyonight.nvim", - lazy = false, - opts = { style = "light" }, - }, - - { - "catppuccin/nvim", - lazy = false, - name = "catppuccin", - }, - - { - "nordtheme/vim", - lazy = false, - name = "nordtheme", - }, -} - diff --git a/nvim/lua/plugins/toggle-term.lua b/nvim/lua/plugins/toggle-term.lua deleted file mode 100644 index 5ad805b..0000000 --- a/nvim/lua/plugins/toggle-term.lua +++ /dev/null @@ -1,17 +0,0 @@ -return { - 'akinsho/toggleterm.nvim', - version = "*", - config = function() - require("toggleterm").setup({ - size = 20, - open_mapping = [[]], - shade_filetypes = {}, - shade_terminals = true, - shading_factor = 1, - start_in_insert = true, - insert_mappings = true, - persist_size = true, - direction = 'horizontal', - }) - end, -} diff --git a/nvim/lua/plugins/which-key.lua b/nvim/lua/plugins/which-key.lua deleted file mode 100644 index 8c52794..0000000 --- a/nvim/lua/plugins/which-key.lua +++ /dev/null @@ -1,10 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", - init = function() - vim.o.timeout = true - vim.o.timeoutlen = 1000 - end, - opts = { - } -} diff --git a/nvim/nvim-pack-lock.json b/nvim/nvim-pack-lock.json new file mode 100644 index 0000000..29630ce --- /dev/null +++ b/nvim/nvim-pack-lock.json @@ -0,0 +1,40 @@ +{ + "plugins": { + "catppuccin": { + "rev": "49a926655a2f5579e9c276470fc300baaa49e524", + "src": "https://github.com/catppuccin/nvim" + }, + "catppuccin-nv": { + "rev": "49a926655a2f5579e9c276470fc300baaa49e524", + "src": "https://github.com/catppuccin/nvim" + }, + "fidget.nvim": { + "rev": "82404b196e73a00b1727a91903beef5ddc319d22", + "src": "https://github.com/j-hui/fidget.nvim" + }, + "lualine.nvim": { + "rev": "221ce6b2d999187044529f49da6554a92f740a96", + "src": "https://github.com/nvim-lualine/lualine.nvim" + }, + "mason-lspconfig.nvim": { + "rev": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76", + "src": "https://github.com/williamboman/mason-lspconfig.nvim" + }, + "mason.nvim": { + "rev": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d", + "src": "https://github.com/williamboman/mason.nvim" + }, + "mini.nvim": { + "rev": "a59a9b7fb0a42cbcf022938ee5f0724320b66f63", + "src": "https://github.com/nvim-mini/mini.nvim" + }, + "nvim-lspconfig": { + "rev": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7", + "src": "https://github.com/neovim/nvim-lspconfig" + }, + "oil.nvim": { + "rev": "b73018b75affd13fa38e2fc94ef753b465f770d7", + "src": "https://github.com/stevearc/oil.nvim" + } + } +}