diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..359a391 --- /dev/null +++ b/.clangd @@ -0,0 +1,2 @@ +CompileFlags: + Add: [-std=c++20] diff --git a/.config/fish/conf.d/rustup.fish b/.config/fish/conf.d/rustup.fish new file mode 100644 index 0000000..e4cb363 --- /dev/null +++ b/.config/fish/conf.d/rustup.fish @@ -0,0 +1 @@ +source "$HOME/.cargo/env.fish" diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 68996f6..18c4cd8 100755 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -16,18 +16,10 @@ switch (uname) end # PATH - # Local PATH - #export PATH=$PATH:$HOME/.local/bin + # Rust + source "$HOME/.cargo/env.fish" - ## Ruby PATH - #export PATH="/opt/homebrew/opt/ruby/bin:$PATH" - - ## Homebrew binaries PATH - #export PATH="/opt/homebrew/bin:$PATH" - #export PATH="/opt/homebrew/sbin:$PATH" - #eval "$(brew shellenv)" - - ## pyenv + # pyenv #export PYENV_ROOT="$HOME/.pyenv" #export PATH="$PYENV_ROOT/bin:$PATH" pyenv init - | source diff --git a/.config/fish/fish_variables b/.config/fish/fish_variables index 76e2248..37eab00 100755 --- a/.config/fish/fish_variables +++ b/.config/fish/fish_variables @@ -30,4 +30,4 @@ SETUVAR fish_pager_color_description:yellow\x1e\x2di SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan SETUVAR fish_pager_color_selected_background:\x2dr -SETUVAR fish_user_paths:/Users/administrator/\x2elocal/bin\x1e/opt/homebrew/opt/ruby/bin\x1e/opt/homebrew/sbin\x1e/opt/homebrew/bin +SETUVAR fish_user_paths:/Users/administrator/\x2elocal/share/nvim/mason/bin\x1e/Users/administrator/\x2elocal/bin\x1e/opt/homebrew/opt/ruby/bin\x1e/opt/homebrew/sbin\x1e/opt/homebrew/bin diff --git a/.config/nvim/after/plugin/01_color.lua b/.config/nvim/after/plugin/01_color.lua new file mode 100755 index 0000000..58ce3a2 --- /dev/null +++ b/.config/nvim/after/plugin/01_color.lua @@ -0,0 +1,12 @@ +require("tokyonight").setup { + transparent = false, + styles = { + sidebars = "transparent", + floats = "transparent", + } +} + +vim.cmd [[colorscheme tokyonight-night]] +-- vim.cmd [[colorscheme tokyonight-day]] +-- vim.cmd [[set notermguicolors]] +vim.cmd [[hi Normal guibg=none]] diff --git a/.config/nvim/after/plugin/02_treesitter.lua b/.config/nvim/after/plugin/02_treesitter.lua new file mode 100755 index 0000000..20e9d37 --- /dev/null +++ b/.config/nvim/after/plugin/02_treesitter.lua @@ -0,0 +1,47 @@ +local configs = require("nvim-treesitter.configs") + +configs.setup({ + -- A list of parser names, or "all" (the listed parsers MUST always be installed) + ensure_installed = { + "bash", + "c", + "lua", + "query", + "markdown", + "markdown_inline", + "rust", + "vim", + "vimdoc", + }, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + + -- List of parsers to ignore installing (or "all") + ignore_install = { "javascript" }, + + ---- 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 = true, + + -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to + -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is + -- the name of the parser) + -- list of language that will be disabled + disable = { + "tex", + }, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +}) diff --git a/.config/nvim/after/plugin/03_mason.lua b/.config/nvim/after/plugin/03_mason.lua new file mode 100644 index 0000000..6d28d83 --- /dev/null +++ b/.config/nvim/after/plugin/03_mason.lua @@ -0,0 +1,11 @@ +local mason = require("mason") + +mason.setup({ + ui = { + icons = { + package_installed = "✓", + package_pending = "➜", + package_uninstalled = "✗" + } + } +}) diff --git a/.config/nvim/after/plugin/04_lspconfig.lua b/.config/nvim/after/plugin/04_lspconfig.lua new file mode 100644 index 0000000..e23b020 --- /dev/null +++ b/.config/nvim/after/plugin/04_lspconfig.lua @@ -0,0 +1,120 @@ +local lspconfig = require 'lspconfig' + +local on_attach = function(client) + require 'completion'.on_attach(client) +end + +-- BASH +lspconfig.bashls.setup({}) + +-- CLANG +lspconfig.clangd.setup({}) + +-- CMAKE +lspconfig.cmake.setup({}) + +-- LATEX +local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt" +local words = {} + +for word in io.open(path, "r"):lines() do + table.insert(words, word) +end + +require('lspconfig').ltex.setup({ + settings = { + ltex = { + language = "en-GB", + dictionary = { + ["en-GB"] = words, + }, + }, + }, +}) + +-- LUA +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', + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { 'vim' }, + neededFileStatus = { + ["codestyle-check"] = "Any", + }, + }, + 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, + }, + format = { + enable = true, + -- Put format options here + -- NOTE: the value should be STRING!! + defaultConfig = { + indent_style = "space", + indent_size = "4", + } + }, + }, + }, +}) + + +-- PYTHON +require('lspconfig').pylsp.setup { + settings = { + pylsp = { + plugins = { + -- formatter options + black = { enabled = true }, + autopep8 = { enabled = false }, + yapf = { enabled = false }, + -- linter options + pylint = { enabled = false, executable = "pylint" }, + pyflakes = { enabled = false }, + pycodestyle = { enabled = true, maxLineLength = 110 }, + -- type checker + pylsp_mypy = { enabled = true }, + -- auto-completion options + jedi_completion = { fuzzy = true }, + -- import sorting + pyls_isort = { enabled = true }, + }, + }, + }, + flags = { + debounce_text_changes = 200, + }, +} + +-- RUST +lspconfig.rust_analyzer.setup({ + -- on_attach = on_attach, + settings = { + ["rust-analyzer"] = { + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true + }, + } + } +}) diff --git a/.config/nvim/after/plugin/05_completion.lua b/.config/nvim/after/plugin/05_completion.lua new file mode 100644 index 0000000..8bfcaab --- /dev/null +++ b/.config/nvim/after/plugin/05_completion.lua @@ -0,0 +1,103 @@ +-- Set up nvim-cmp. +local cmp = require 'cmp' + +cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + -- require('snippy').expand_snippet(args.body) -- For `snippy` users. + -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. + -- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+) + end, + }, + window = { + -- completion = cmp.config.window.bordered(), + -- documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'vsnip' }, -- For vsnip users. + -- { name = 'luasnip' }, -- For luasnip users. + -- { name = 'ultisnips' }, -- For ultisnips users. + -- { name = 'snippy' }, -- For snippy users. + }, { + { name = 'buffer' }, + }) +}) + +-- To use git you need to install the plugin petertriho/cmp-git and uncomment lines below +-- Set configuration for specific filetype. +--[[ cmp.setup.filetype('gitcommit', { + sources = cmp.config.sources({ + { name = 'git' }, + }, { + { name = 'buffer' }, + }) +}) +require("cmp_git").setup() ]]-- + +-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } +}) + +-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }), + matching = { disallow_symbol_nonprefix_matching = false } +}) + +-- Set up lspconfig. +local capabilities = require('cmp_nvim_lsp').default_capabilities() +-- Replace with each lsp server you've enabled. +-- BASH +require('lspconfig')['bashls'].setup { + capabilities = capabilities +} + +-- CLANG +require('lspconfig')['clangd'].setup { + capabilities = capabilities +} + +-- CMAKE +require('lspconfig')['cmake'].setup { + capabilities = capabilities +} + +-- LUA +require('lspconfig')['lua_ls'].setup { + capabilities = capabilities +} + +-- LaTeX +require('lspconfig')['ltex'].setup { + capabilities = capabilities +} + +-- PYTHON +require('lspconfig')['pylsp'].setup { + capabilities = capabilities +} + +-- RUST +require('lspconfig')['rust_analyzer'].setup { + capabilities = capabilities +} diff --git a/.config/nvim/after/plugin/06_mason-lspconfig.lua b/.config/nvim/after/plugin/06_mason-lspconfig.lua new file mode 100644 index 0000000..b9ebf9f --- /dev/null +++ b/.config/nvim/after/plugin/06_mason-lspconfig.lua @@ -0,0 +1,13 @@ +local mason_lspconfig = require("mason-lspconfig") + +mason_lspconfig.setup { + ensure_installed = { + 'bashls', + 'clangd', + 'cmake', + 'lua_ls', + 'ltex', + 'pylsp', + 'rust_analyzer', + }, +} diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/08_harpoon.lua similarity index 100% rename from .config/nvim/after/plugin/harpoon.lua rename to .config/nvim/after/plugin/08_harpoon.lua diff --git a/.config/nvim/after/plugin/telescope.lua b/.config/nvim/after/plugin/09_telescope.lua similarity index 100% rename from .config/nvim/after/plugin/telescope.lua rename to .config/nvim/after/plugin/09_telescope.lua diff --git a/.config/nvim/after/plugin/neoclip.lua b/.config/nvim/after/plugin/10_neoclip.lua similarity index 100% rename from .config/nvim/after/plugin/neoclip.lua rename to .config/nvim/after/plugin/10_neoclip.lua diff --git a/.config/nvim/after/plugin/nvim-tree.lua b/.config/nvim/after/plugin/11_nvim-tree.lua similarity index 100% rename from .config/nvim/after/plugin/nvim-tree.lua rename to .config/nvim/after/plugin/11_nvim-tree.lua diff --git a/.config/nvim/after/plugin/parenthesis.lua b/.config/nvim/after/plugin/12_parenthesis.lua similarity index 100% rename from .config/nvim/after/plugin/parenthesis.lua rename to .config/nvim/after/plugin/12_parenthesis.lua diff --git a/.config/nvim/after/plugin/terminal.lua b/.config/nvim/after/plugin/13_terminal.lua similarity index 100% rename from .config/nvim/after/plugin/terminal.lua rename to .config/nvim/after/plugin/13_terminal.lua diff --git a/.config/nvim/after/plugin/color.lua b/.config/nvim/after/plugin/color.lua deleted file mode 100755 index 562e073..0000000 --- a/.config/nvim/after/plugin/color.lua +++ /dev/null @@ -1,14 +0,0 @@ ---require("tokyonight").setup { --- transparent = false, --- -- styles = { --- -- sidebars = "transparent", --- -- floats = "transparent", --- -- } ---} --- ---vim.cmd [[colorscheme tokyonight-night]] ----- vim.cmd [[colorscheme tokyonight-day]] ----- vim.cmd [[hi Normal guibg=none]] - -vim.cmd [[set notermguicolors]] -vim.cmd [[hi Normal guibg=none]] diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua deleted file mode 100755 index a62a8e5..0000000 --- a/.config/nvim/after/plugin/lsp.lua +++ /dev/null @@ -1,415 +0,0 @@ -local lsp = require('lsp-zero') - -local f = io.popen("uname -s") -if (f ~= nil) then - MY_OS = f:read("*a") - MY_OS = string.gsub(MY_OS, "%s+", "") - f:close() -end - -local f = io.popen("uname -m") -if (f ~= nil) then - MY_ARCH = f:read("*a") - MY_ARCH = string.gsub(MY_ARCH, "%s+", "") - f:close() -end - -lsp.preset("recommended") - -if (MY_OS == 'Linux') -then - if (MY_ARCH == 'aarch64') - then - lsp.ensure_installed({ - -- Replace these with whatever servers you want to install - 'bashls', - 'julials', - 'ltex', - 'pylsp', - 'rust_analyzer', - }) - else - lsp.ensure_installed({ - -- Replace these with whatever servers you want to install - 'bashls', - 'clangd', - 'cmake', - 'julials', - 'lua_ls', - 'ltex', - 'pylsp', - 'rust_analyzer', - }) - - end -elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') -then - lsp.ensure_installed({ - -- Replace these with whatever servers you want to install - 'bashls', - 'pylsp' - }) -elseif (MY_OS == 'Darwin') -then - lsp.ensure_installed({ - -- Replace these with whatever servers you want to install - 'clangd', - 'cmake', - 'julials', - 'lua_ls', - 'ltex', - 'pylsp', - 'rust_analyzer', - }) -else - print('Should never be here LSP') -end - -vim.cmd([[ -set rtp^=~/.opam/default/share/ocp-indent/vim -]]) - -local cmp = require("cmp") -local cmp_select = { behavior = cmp.SelectBehavior.Select } -local cmp_mappings = lsp.defaults.cmp_mappings({ - [""] = cmp.mapping.select_prev_item(cmp_select), - [""] = cmp.mapping.select_next_item(cmp_select), - [""] = cmp.mapping.confirm({ select = true }), - [""] = cmp.mapping.confirm({ select = true }), - [''] = cmp.mapping.complete(), -}) - -lsp.setup_nvim_cmp({ - mapping = cmp_mappings -}) - -lsp.on_attach(function(client, bufnr) - local opts = { buffer = bufnr, remap = false } - - vim.keymap.set("n", "gr", function() vim.lsp.buf.references() end, opts, { desc = "LSP Goto Reference" }) - vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts, { desc = "LSP Goto Definition" }) - vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts, { desc = "LSP Hover" }) - vim.keymap.set("n", "vws", function() vim.lsp.buf.workspace_symbol() end, opts, - { desc = "LSP Workspace Symbol" }) - vim.keymap.set("n", "vd", function() vim.diagnostic.setloclist() end, opts, { desc = "LSP Show Diagnostics" }) - vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts, { desc = "Next Diagnostic" }) - vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts, { desc = "Previous Diagnostic" }) - vim.keymap.set("n", "vca", function() vim.lsp.buf.code_action() end, opts, { desc = "LSP Code Action" }) - vim.keymap.set("n", "vrr", function() vim.lsp.buf.references() end, opts, { desc = "LSP References" }) - vim.keymap.set("n", "vrn", function() vim.lsp.buf.rename() end, opts, { desc = "LSP Rename" }) - vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts, { desc = "LSP Signature Help" }) -end) - - -if (MY_OS == 'Linux') -then - -- Installed for Linux - require('lspconfig').bashls.setup({}) - - require('lspconfig').clangd.setup({}) - - require('lspconfig').cmake.setup({}) - - --require('lspconfig').gopls.setup({}) - - require('lspconfig').julials.setup({}) - - --require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) - require('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', - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim' }, - neededFileStatus = { - ["codestyle-check"] = "Any", - }, - }, - 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, - }, - format = { - enable = true, - -- Put format options here - -- NOTE: the value should be STRING!! - defaultConfig = { - indent_style = "space", - indent_size = "4", - } - }, - }, - }, - }) - - local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt" - local words = {} - - for word in io.open(path, "r"):lines() do - table.insert(words, word) - end - - require('lspconfig').ltex.setup({ - settings = { - ltex = { - language = "en-GB", - dictionary = { - ["en-GB"] = words, - }, - }, - }, - }) - - require('lspconfig').pylsp.setup { - settings = { - pylsp = { - plugins = { - -- formatter options - black = { enabled = true }, - autopep8 = { enabled = false }, - yapf = { enabled = false }, - -- linter options - pylint = { enabled = false, executable = "pylint" }, - pyflakes = { enabled = false }, - pycodestyle = { enabled = true, maxLineLength = 110 }, - -- type checker - pylsp_mypy = { enabled = true }, - -- auto-completion options - jedi_completion = { fuzzy = true }, - -- import sorting - pyls_isort = { enabled = true }, - }, - }, - }, - flags = { - debounce_text_changes = 200, - }, - } - - require('lspconfig').rust_analyzer.setup({ - settings = { - ["rust-analyzer"] = { - diagnostics = { - enable = false; - } - } - } - }) - - -elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') -then - -- Installed for BSD - require('lspconfig').bashls.setup({}) - - require('lspconfig').clangd.setup({}) - - require('lspconfig').cmake.setup({}) - - require('lspconfig').ltex.setup({ - settings = { - ltex = { - language = "en-GB", - dictionary = { - ["en-GB"] = words, - }, - }, - }, - }) - - require('lspconfig').pylsp.setup { - settings = { - pylsp = { - plugins = { - -- formatter options - black = { enabled = true }, - autopep8 = { enabled = false }, - yapf = { enabled = false }, - -- linter options - pylint = { enabled = false, executable = "pylint" }, - pyflakes = { enabled = false }, - pycodestyle = { enabled = true, maxLineLength = 110 }, - -- type checker - pylsp_mypy = { enabled = true }, - -- auto-completion options - jedi_completion = { fuzzy = true }, - -- import sorting - pyls_isort = { enabled = true }, - }, - }, - }, - flags = { - debounce_text_changes = 200, - }, - } - - require('lspconfig').rust_analyzer.setup({ - settings = { - ["rust-analyzer"] = { - diagnostics = { - enable = false; - } - } - } - }) - - -elseif (MY_OS == 'Darwin') -then - -- Installed for Linux - require('lspconfig').clangd.setup({}) - - require('lspconfig').cmake.setup({}) - - --require('lspconfig').gopls.setup({}) - - require('lspconfig').julials.setup({}) - - --require('lspconfig').lua_ls.setup(lsp.nvim_lua_ls()) - require('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', - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { 'vim' }, - neededFileStatus = { - ["codestyle-check"] = "Any", - }, - }, - 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, - }, - format = { - enable = true, - -- Put format options here - -- NOTE: the value should be STRING!! - defaultConfig = { - indent_style = "space", - indent_size = "4", - } - }, - }, - }, - }) - - local path = vim.fn.stdpath("config") .. "/after/plugin/dictionary-gb.txt" - local words = {} - - for word in io.open(path, "r"):lines() do - table.insert(words, word) - end - - require('lspconfig').ltex.setup({ - settings = { - ltex = { - language = "en-GB", - dictionary = { - ["en-GB"] = words, - }, - }, - }, - }) - - require('lspconfig').pylsp.setup { - settings = { - pylsp = { - plugins = { - -- formatter options - black = { enabled = true }, - autopep8 = { enabled = false }, - yapf = { enabled = false }, - -- linter options - pylint = { enabled = false, executable = "pylint" }, - pyflakes = { enabled = false }, - pycodestyle = { enabled = true, maxLineLength = 110 }, - -- type checker - pylsp_mypy = { enabled = true }, - -- auto-completion options - jedi_completion = { fuzzy = true }, - -- import sorting - pyls_isort = { enabled = true }, - }, - }, - }, - flags = { - debounce_text_changes = 200, - }, - } - - require('lspconfig').rust_analyzer.setup({ - settings = { - ["rust-analyzer"] = { - diagnostics = { - enable = false; - } - } - } - }) - -else - print('Should never be here LSP config') -end - - - -lsp.setup() - -local cmp_action = require('lsp-zero').cmp_action() - -require('luasnip.loaders.from_vscode').lazy_load() - --- `/` cmdline setup. -cmp.setup.cmdline('/', { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } -}) - --- `:` cmdline setup. -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { - name = 'cmdline', - option = { - ignore_cmds = { 'Man', '!' } - } - } - }) -}) - -cmp.setup({ - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip', keyword_length = 2 }, - { name = 'buffer', keyword_length = 3 }, - { name = 'path' }, - }, - mapping = { - [''] = cmp_action.luasnip_jump_forward(), - [''] = cmp_action.luasnip_jump_backward(), - [''] = cmp_action.luasnip_supertab(), - [''] = cmp_action.luasnip_shift_supertab(), - }, -}) - diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua deleted file mode 100755 index 3a7c1f9..0000000 --- a/.config/nvim/after/plugin/treesitter.lua +++ /dev/null @@ -1,64 +0,0 @@ -local configs = require("nvim-treesitter.configs") - -local f = io.popen("uname -s") -if (f ~= nil) then - MY_OS = f:read("*a") - MY_OS = string.gsub(MY_OS, "%s+", "") - f:close() -end - -if (MY_OS == 'Linux') -then - configs.setup({ - ensure_installed = { - "bash", - "c", - "json", - "julia", - "lua", - "vim", - "vimdoc", - "zig", - }, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true }, - }) -elseif (MY_OS == 'FreeBSD') or (MY_OS == 'OpenBSD') -then - --print('Should be here if on BSD') - configs.setup({ - ensure_installed = { - "bash", - "c", - "json", - "vim", - "vimdoc", - "zig", - }, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true }, - }) -elseif (MY_OS == 'Darwin') -then - --print('Should be here if on MacOS') - configs.setup({ - ensure_installed = { - "bash", - "c", - "julia", - "json", - "lua", - "ocaml", - "vim", - "vimdoc", - "zig", - }, - sync_install = false, - highlight = { enable = true }, - indent = { enable = true }, - }) -else - print('Should never be here') -end diff --git a/.config/nvim/lua/eddie/lazy.lua b/.config/nvim/lua/eddie/lazy.lua index d3e1d74..c4ede77 100755 --- a/.config/nvim/lua/eddie/lazy.lua +++ b/.config/nvim/lua/eddie/lazy.lua @@ -15,31 +15,29 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' local plugins = { + -- Language server configuration + { 'neovim/nvim-lspconfig' }, { - 'VonHeikemen/lsp-zero.nvim', - branch = 'v2.x', - dependencies = { - -- LSP Support - { 'neovim/nvim-lspconfig' }, -- Required - { -- Optional - 'williamboman/mason.nvim', - build = function() - pcall(vim.cmd, 'MasonUpdate') - end, - }, - { 'williamboman/mason-lspconfig.nvim' }, -- Optional - - -- Autocompletion - { 'hrsh7th/nvim-cmp' }, -- Required - { 'hrsh7th/cmp-nvim-lsp' }, -- Required - { 'L3MON4D3/LuaSnip' }, -- Required - { "rafamadriz/friendly-snippets" }, - { 'hrsh7th/cmp-buffer' }, - { 'hrsh7th/cmp-path' }, - { 'hrsh7th/cmp-cmdline' }, - { 'saadparwaiz1/cmp_luasnip' }, - } + 'williamboman/mason.nvim', + build = function() + pcall(vim.cmd, 'MasonUpdate') + end, }, + { 'williamboman/mason-lspconfig.nvim' }, + + -- Autocompletion + { 'hrsh7th/nvim-cmp' }, + { 'hrsh7th/cmp-nvim-lsp' }, + { 'hrsh7th/cmp-buffer' }, + { 'hrsh7th/cmp-path' }, + { 'hrsh7th/cmp-cmdline' }, + + -- -- For luasnip users + { 'L3MON4D3/LuaSnip' }, + { 'saadparwaiz1/cmp_luasnip' }, + { "rafamadriz/friendly-snippets" }, + + -- Helper package for cmp { 'nvimtools/none-ls.nvim', config = function() @@ -49,6 +47,7 @@ local plugins = { end, dependencies = { 'nvim-lua/plenary.nvim' }, }, + { "simrat39/rust-tools.nvim" }, { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate", @@ -58,6 +57,7 @@ local plugins = { lazy = false, -- we don't want to lazy load VimTeX -- tag = "v2.15", -- uncomment to pin to a specific release }, + { 'echasnovski/mini.nvim', version = '*' }, -- Minimal { 'nvim-telescope/telescope.nvim', @@ -97,6 +97,13 @@ local plugins = { require('Comment').setup() end }, + -- Colorscheme + { + "folke/tokyonight.nvim", + lazy = false, + priority = 1000, + opts = {}, + }, -- Autoclose parenthesis { 'm4xshen/autoclose.nvim' }, -- tree navigator diff --git a/.config/nvim/lua/eddie/options.lua b/.config/nvim/lua/eddie/options.lua index b82edd5..f4b3350 100755 --- a/.config/nvim/lua/eddie/options.lua +++ b/.config/nvim/lua/eddie/options.lua @@ -189,8 +189,8 @@ then vim.opt.wrap = true -- Fonts vim.opt.encoding = "utf-8" - vim.opt.guifont = "FiraCodeNerdFont-Regular:h10" + -- Undo vim.opt.swapfile = false vim.opt.backup = false vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" @@ -226,8 +226,6 @@ then -- Vimtex options: vim.g.vimtex_view_method = "sioyek" vim.g.vimtex_view_sioyek_exe = "/Applications/sioyek.app/Contents/MacOS/sioyek" - -- vim.g.vimtex_view_method = "zathura" - -- vim.g.vimtex_general_viewer = "zathura" vim.g.vimtex_quickfix_mode = 0 -- Ignore mappings @@ -248,7 +246,7 @@ then }) -- Python provider - vim.g.python3_host_prog = "/usr/local/share/pyenv/shims/python" + vim.g.python3_host_prog = "$HOME/.pyenv/shims/python" else print('Should never be here LSP') end diff --git a/.gitignore b/.gitignore index 4523b2a..a0e1004 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ .gnupg/private-keys-v1.d/* .gnupg/public-keys.d/* .gnupg/random_seed +.gnupg/reader_0.status .ssh/known_hosts* diff --git a/.gnupg/reader_0.status b/.gnupg/reader_0.status deleted file mode 100644 index bfaca9c..0000000 --- a/.gnupg/reader_0.status +++ /dev/null @@ -1 +0,0 @@ -USABLE diff --git a/.tmux.conf b/.tmux.conf index 8c74f0a..587b000 100755 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,3 +1,7 @@ +# Neovim required +set-option -g focus-events on +set-option -a terminal-features 'alacritty:RGB' + #set -g default-terminal "screen-256color" set-window-option -g mode-keys vi