diff --git a/init.lua b/init.lua index 2800b1c..db024f7 100644 --- a/init.lua +++ b/init.lua @@ -426,11 +426,11 @@ require('lazy').setup({ -- Useful status updates for LSP. -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + -- { 'j-hui/fidget.nvim', opts = {} }, -- `neodev` configures Lua LSP for your Neovim config, runtime and plugins -- used for completion, annotations and signatures of Neovim apis - { 'folke/neodev.nvim', opts = {} }, + { 'folke/lazydev.nvim', opts = {} }, }, config = function() -- Brief aside: **What is LSP?** @@ -621,6 +621,7 @@ require('lazy').setup({ 'css-lsp', 'prettier', 'prettierd', + 'typescript-language-server', -- Python 'ruff', 'pyright', @@ -638,6 +639,7 @@ require('lazy').setup({ handlers = { function(server_name) local server = servers[server_name] or {} + -- This handles overriding only values explicitly passed -- by the server configuration above. Useful when disabling -- certain features of an LSP (for example, turning off formatting for tsserver) @@ -682,9 +684,9 @@ require('lazy').setup({ -- You can use a sub-list to tell conform to run *until* a formatter -- is found. markdown = { 'markdownlint', 'marksman' }, - javascript = { { 'prettierd', 'prettier' } }, - typescript = { { 'prettierd', 'prettier' } }, - typescriptreact = { { 'prettierd', 'prettier' } }, + javascript = { 'prettierd', 'prettier' }, + typescript = { 'prettierd', 'prettier', stop_after_first = true, lsp_fallback = false }, + typescriptreact = { 'prettierd', 'prettier' }, }, }, }, @@ -920,11 +922,9 @@ require('lazy').setup({ -- Here are some example plugins that I've included in the Kickstart repository. -- 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.lint', require 'kickstart.plugins.autopairs', - 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` diff --git a/lua/custom/plugins/code-runner.lua b/lua/custom/plugins/code-runner.lua new file mode 100644 index 0000000..300c6c2 --- /dev/null +++ b/lua/custom/plugins/code-runner.lua @@ -0,0 +1,14 @@ +return { + 'michaelb/sniprun', + branch = 'master', + + build = 'sh install.sh', + -- do 'sh install.sh 1' if you want to force compile locally + -- (instead of fetching a binary from the github release). Requires Rust >= 1.65 + + config = function() + require('sniprun').setup { + -- your options + } + end, +} diff --git a/lua/custom/plugins/coq.lua b/lua/custom/plugins/coq.lua new file mode 100644 index 0000000..6ac6161 --- /dev/null +++ b/lua/custom/plugins/coq.lua @@ -0,0 +1,99 @@ +return { + -- 'neovim/nvim-lspconfig', -- REQUIRED: for native Neovim LSP integration + -- lazy = false, -- REQUIRED: tell lazy.nvim to start this plugin at startup + -- dependencies = { + -- -- main one + -- { 'ms-jpq/coq_nvim', branch = 'coq' }, + -- + -- -- 9000+ Snippets + -- { 'ms-jpq/coq.artifacts', branch = 'artifacts' }, + -- + -- -- lua & third party sources -- See https://github.com/ms-jpq/coq.thirdparty + -- -- Need to **configure separately** + -- { 'ms-jpq/coq.thirdparty', branch = '3p' }, + -- -- - shell repl + -- -- - nvim lua api + -- -- - scientific calculator + -- -- - comment banner + -- -- - etc + -- }, + -- init = function() + -- vim.g.coq_settings = { + -- auto_start = true, -- if you want to start COQ at startup + -- -- Your COQ settings here + -- } + -- end, + -- config = function() + -- -- See `:help cmp` + -- local cmp = require 'coq' + -- local luasnip = require 'luasnip' + -- luasnip.config.setup {} + -- + -- cmp.setup { + -- snippet = { + -- expand = function(args) + -- luasnip.lsp_expand(args.body) + -- end, + -- }, + -- completion = { completeopt = 'menu,menuone,noinsert' }, + -- + -- -- For an understanding of why these mappings were + -- -- chosen, you will need to read `:help ins-completion` + -- -- + -- -- No, but seriously. Please read `:help ins-completion`, it is really good! + -- mapping = cmp.mapping.preset.insert { + -- -- Select the [n]ext item + -- [''] = cmp.mapping.select_next_item(), + -- -- Select the [p]revious item + -- [''] = cmp.mapping.select_prev_item(), + -- + -- -- Scroll the documentation window [b]ack / [f]orward + -- [''] = cmp.mapping.scroll_docs(-4), + -- [''] = cmp.mapping.scroll_docs(4), + -- + -- -- Accept ([y]es) the completion. + -- -- This will auto-import if your LSP supports it. + -- -- This will expand snippets if the LSP sent a snippet. + -- [''] = cmp.mapping.confirm { select = true }, + -- + -- -- If you prefer more traditional completion keymaps, + -- -- you can uncomment the following lines + -- --[''] = cmp.mapping.confirm { select = true }, + -- --[''] = cmp.mapping.select_next_item(), + -- --[''] = cmp.mapping.select_prev_item(), + -- + -- -- Manually trigger a completion from nvim-cmp. + -- -- Generally you don't need this, because nvim-cmp will display + -- -- completions whenever it has completion options available. + -- [''] = cmp.mapping.complete {}, + -- + -- -- Think of as moving to the right of your snippet expansion. + -- -- So if you have a snippet that's like: + -- -- function $name($args) + -- -- $body + -- -- end + -- -- + -- -- will move you to the right of each of the expansion locations. + -- -- is similar, except moving you backwards. + -- [''] = cmp.mapping(function() + -- if luasnip.expand_or_locally_jumpable() then + -- luasnip.expand_or_jump() + -- end + -- end, { 'i', 's' }), + -- [''] = cmp.mapping(function() + -- if luasnip.locally_jumpable(-1) then + -- luasnip.jump(-1) + -- end + -- end, { 'i', 's' }), + -- + -- -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: + -- -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps + -- }, + -- sources = { + -- { name = 'nvim_lsp' }, + -- { name = 'luasnip' }, + -- { name = 'path' }, + -- }, + -- } + -- end, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 75c34b2..b5b71d1 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -4,25 +4,7 @@ -- See the kickstart.nvim README for more information return { { - 'iamcco/markdown-preview.nvim', - cmd = { 'MarkdownPreviewToggle', 'MarkdownPreview', 'MarkdownPreviewStop' }, - build = 'cd app && yarn install', - init = function() - vim.g.mkdp_filetypes = { 'markdown' } - end, - ft = { 'markdown' }, + 'OXY2DEV/markview.nvim', + lazy = false, }, - { - 'navarasu/onedark.nvim', - opts = { - style = 'warm', - transparent = true, - term_colors = true, - }, - }, - { - - 'folke/tokyonight.nvim', - }, - { 'catppuccin/nvim', name = 'catppuccin', priority = 1000 }, } diff --git a/lua/custom/plugins/neogen.lua b/lua/custom/plugins/neogen.lua new file mode 100644 index 0000000..206f52b --- /dev/null +++ b/lua/custom/plugins/neogen.lua @@ -0,0 +1,4 @@ +return { + 'danymat/neogen', + config = true, +} diff --git a/lua/custom/plugins/startup.lua b/lua/custom/plugins/startup.lua new file mode 100644 index 0000000..108b712 --- /dev/null +++ b/lua/custom/plugins/startup.lua @@ -0,0 +1,7 @@ +return { + 'startup-nvim/startup.nvim', + dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim', 'nvim-telescope/telescope-file-browser.nvim' }, + config = function() + require('startup').setup { theme = 'evil' } + end, +} diff --git a/lua/custom/plugins/typescript-tools.lua b/lua/custom/plugins/typescript-tools.lua index 3c68729..5283360 100644 --- a/lua/custom/plugins/typescript-tools.lua +++ b/lua/custom/plugins/typescript-tools.lua @@ -10,4 +10,5 @@ return { 'pmizio/typescript-tools.nvim', dependencies = { 'nvim-lua/plenary.nvim', 'neovim/nvim-lspconfig' }, opts = opts, + lazy = true, } diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua deleted file mode 100644 index 31dfecf..0000000 --- a/lua/kickstart/plugins/debug.lua +++ /dev/null @@ -1,96 +0,0 @@ --- debug.lua --- --- Shows how to use the DAP plugin to debug your code. --- --- Primarily focused on configuring the debugger for Go, but can --- be extended to other languages as well. That's why it's called --- kickstart.nvim and not kitchen-sink.nvim ;) - -return { - -- NOTE: Yes, you can install new plugins here! - 'mfussenegger/nvim-dap', - -- NOTE: And you can specify dependencies as well - dependencies = { - -- Creates a beautiful debugger UI - 'rcarriga/nvim-dap-ui', - - -- Required dependency for nvim-dap-ui - 'nvim-neotest/nvim-nio', - - -- Installs the debug adapters for you - 'williamboman/mason.nvim', - 'jay-babu/mason-nvim-dap.nvim', - - -- Add your own debuggers here - 'leoluz/nvim-dap-go', - }, - config = function() - local dap = require 'dap' - local dapui = require 'dapui' - - require('mason-nvim-dap').setup { - -- Makes a best effort to setup the various debuggers with - -- reasonable debug configurations - automatic_installation = true, - - -- You can provide additional configuration to the handlers, - -- see mason-nvim-dap README for more information - handlers = {}, - - -- You'll need to check that you have the required things installed - -- online, please don't ask me how to install them :) - ensure_installed = { - -- Update this to ensure that you have the debuggers for the langs you want - 'delve', - }, - } - - -- Basic debugging keymaps, feel free to change to your liking! - vim.keymap.set('n', '', dap.continue, { desc = 'Debug: Start/Continue' }) - vim.keymap.set('n', '', dap.step_into, { desc = 'Debug: Step Into' }) - vim.keymap.set('n', '', dap.step_over, { desc = 'Debug: Step Over' }) - vim.keymap.set('n', '', dap.step_out, { desc = 'Debug: Step Out' }) - vim.keymap.set('n', 'b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' }) - vim.keymap.set('n', 'B', function() - dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') - end, { desc = 'Debug: Set Breakpoint' }) - - -- Dap UI setup - -- For more information, see |:help nvim-dap-ui| - dapui.setup { - -- Set icons to characters that are more likely to work in every terminal. - -- Feel free to remove or use ones that you like more! :) - -- Don't feel like these are good choices. - icons = { expanded = '▾', collapsed = '▸', current_frame = '*' }, - controls = { - icons = { - pause = '⏸', - play = '▶', - step_into = '⏎', - step_over = '⏭', - step_out = '⏮', - step_back = 'b', - run_last = '▶▶', - terminate = '⏹', - disconnect = '⏏', - }, - }, - } - - -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. - vim.keymap.set('n', '', dapui.toggle, { desc = 'Debug: See last session result.' }) - - dap.listeners.after.event_initialized['dapui_config'] = dapui.open - dap.listeners.before.event_terminated['dapui_config'] = dapui.close - dap.listeners.before.event_exited['dapui_config'] = dapui.close - - -- Install golang specific config - require('dap-go').setup { - delve = { - -- On Windows delve must be run attached or it crashes. - -- See https://github.com/leoluz/nvim-dap-go/blob/main/README.md#configuring - detached = vim.fn.has 'win32' == 0, - }, - } - end, -} diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua deleted file mode 100644 index 11d816d..0000000 --- a/lua/kickstart/plugins/neo-tree.lua +++ /dev/null @@ -1,26 +0,0 @@ --- Neo-tree is a Neovim plugin to browse the file system --- https://github.com/nvim-neo-tree/neo-tree.nvim - -return { - 'nvim-neo-tree/neo-tree.nvim', - version = '*', - dependencies = { - 'nvim-lua/plenary.nvim', - 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended - 'MunifTanjim/nui.nvim', - }, - cmd = 'Neotree', - keys = { - { '\\', ':Neotree reveal', { desc = 'NeoTree reveal' } }, - }, - opts = { - filesystem = { - window = { - position = 'right', - mappings = { - ['\\'] = 'close_window', - }, - }, - }, - }, -}