diff --git a/.gitignore b/.gitignore index 005b535b606..8a192cab54d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json diff --git a/init.lua b/init.lua index b98ffc6198a..2dc104b19ac 100644 --- a/init.lua +++ b/init.lua @@ -166,6 +166,10 @@ vim.o.scrolloff = 10 -- See `:help 'confirm'` vim.o.confirm = true +-- Enable spell checking +vim.opt.spell = true +vim.opt.spelllang = 'en_us' + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -247,7 +251,29 @@ rtp:prepend(lazypath) -- NOTE: Here is where you install your plugins. require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). - 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically + { + 'NMAC427/guess-indent.nvim', + event = 'BufReadPre', + -- ๐Ÿ‘‡ First, set global defaults + init = function() + vim.opt.expandtab = true + vim.opt.tabstop = 4 + vim.opt.softtabstop = 4 + vim.opt.shiftwidth = 4 + end, + opts = { + auto_cmd = true, -- automatically guess indent on file open + filetype_exclude = { 'netrw', 'tutor' }, + buftype_exclude = { 'help', 'nofile', 'terminal', 'prompt' }, + + -- ๐Ÿ‘‡ your fallback defaults + default_indent = { + tabstop = 4, + shiftwidth = 4, + expandtab = true, + }, + }, + }, -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following @@ -671,9 +697,9 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, + clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -974,17 +1000,17 @@ require('lazy').setup({ -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-๐Ÿ”Œ-plugin-spec` -- Or use telescope! diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..c5cb7243512 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,30 @@ +{ + "CopilotChat.nvim": { "branch": "main", "commit": "a7138a0ee04d8af42c262554eccee168bbf1454f" }, + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, + "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, + "conform.nvim": { "branch": "master", "commit": "fbcb4fa7f34bfea9be702ffff481a8e336ebf6ed" }, + "copilot.vim": { "branch": "release", "commit": "da369d90cfd6c396b1d0ec259836a1c7222fb2ea" }, + "fidget.nvim": { "branch": "main", "commit": "3f5475949679953af6d78654db29b944fa826e6a" }, + "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, + "lazy.nvim": { "branch": "main", "commit": "1ea3c4085785f460fb0e46d2fe1ee895f5f9e7c1" }, + "lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "2304ff65ecc8cb2afc2484de3e2ed9a407edf0b9" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, + "mini.nvim": { "branch": "main", "commit": "e04b5c69e43a6387cb3d54b75635ee432f9b853a" }, + "neo-tree.nvim": { "branch": "main", "commit": "c4c168e459395275c552179a1baf9c3d885d6a74" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-lspconfig": { "branch": "master", "commit": "ac98db2f9f06a56498ec890a96928774eae412c3" }, + "nvim-osc52": { "branch": "main", "commit": "04cfaba1865ae5c53b6f887c3ca7304973824fb2" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "orgmode": { "branch": "master", "commit": "f37b31b5fb6e5efd99963d9d38652df40b91690a" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "19d461ddd543e938eb22505fb03fa878800270b6" }, + "tokyonight.nvim": { "branch": "main", "commit": "e63c42a42b11cd6225f009dd949b9ee0fccc15ef" }, + "which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" } +} diff --git a/lua/custom/plugins/copilot-chat.lua b/lua/custom/plugins/copilot-chat.lua new file mode 100644 index 00000000000..5a510f06fbf --- /dev/null +++ b/lua/custom/plugins/copilot-chat.lua @@ -0,0 +1,13 @@ +--Copilot chat +return { + { + "CopilotC-Nvim/CopilotChat.nvim", + dependencies = { + { "nvim-lua/plenary.nvim", branch = "master" }, + }, + build = "make tiktoken", + opts = { + -- See Configuration section for options + }, + }, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000000..75e93c2885c --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,19 @@ +-- Copilot + +return { + { + "github/copilot.vim", + cmd = "Copilot", + event = "InsertEnter", + config = function() + -- Optional: enable copilot globally + vim.g.copilot_no_tab_map = true + vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', { silent = true, expr = true }) + vim.g.copilot_assume_mapped = true + vim.g.copilot_filetypes = { + ["*"] = true, -- enable for all filetypes + ["markdown"] = false, -- disable for markdown if desired + } + end, + }, +} diff --git a/lua/custom/plugins/ocs52.lua b/lua/custom/plugins/ocs52.lua new file mode 100644 index 00000000000..9d904b38cbb --- /dev/null +++ b/lua/custom/plugins/ocs52.lua @@ -0,0 +1,20 @@ +return { + 'ojroques/nvim-osc52', + event = 'VeryLazy', + opts = { max_length = 0, silent = true }, + config = function(_, opts) + require('osc52').setup(opts) + + -- Send *any* yank to the local clipboard automatically + vim.api.nvim_create_autocmd('TextYankPost', { + callback = function() + if vim.v.event.operator == 'y' then + require('osc52').copy_register(vim.v.event.regname == '' and '"' or vim.v.event.regname) + end + end, + }) + + -- Optional: explicit mappings + vim.keymap.set({ 'n', 'x' }, 'y', require('osc52').copy_visual, { desc = 'Yankโ†’local clipboard' }) + end, +} diff --git a/lua/custom/plugins/orgmode.lua b/lua/custom/plugins/orgmode.lua new file mode 100644 index 00000000000..1644e521f56 --- /dev/null +++ b/lua/custom/plugins/orgmode.lua @@ -0,0 +1,21 @@ +-- Orgmode for Lua + +return { + 'nvim-orgmode/orgmode', + event = 'VeryLazy', + ft = { 'org' }, + config = function() + -- Setup orgmode + require('orgmode').setup({ + org_agenda_files = '~/orgfiles/**/*', + org_default_notes_file = '~/orgfiles/refile.org', + }) + + -- NOTE: If you are using nvim-treesitter with ~ensure_installed = "all"~ option + -- add ~org~ to ignore_install + -- require('nvim-treesitter.configs').setup({ + -- ensure_installed = 'all', + -- ignore_install = { 'org' }, + -- }) + end, +}