aboutsummaryrefslogtreecommitdiffstats
path: root/nvim/after/plugin
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2023-05-14 09:10:26 +0100
committerMatthew Lemon <y@yulqen.org>2023-05-14 09:10:26 +0100
commit0721b537a8aa3be8b70c183b25951494df9dcd0e (patch)
treeeff07bbc31aeefbb9d2e441bb5ca8b5a5a527ffb /nvim/after/plugin
parent10a89dfbc6bc57ce12c8cf90f1b38a34b728b369 (diff)
Installs nvim config base-idea
Diffstat (limited to 'nvim/after/plugin')
-rw-r--r--nvim/after/plugin/ale.lua41
-rw-r--r--nvim/after/plugin/colors.lua14
-rw-r--r--nvim/after/plugin/copilot.lua17
-rw-r--r--nvim/after/plugin/dap.lua30
-rw-r--r--nvim/after/plugin/fugitive.lua1
-rw-r--r--nvim/after/plugin/harpoon.lua10
-rw-r--r--nvim/after/plugin/ledger.lua4
-rw-r--r--nvim/after/plugin/lsp.lua99
-rw-r--r--nvim/after/plugin/luasnip.lua46
-rw-r--r--nvim/after/plugin/marksman.lua1
-rw-r--r--nvim/after/plugin/neotest-python.lua112
-rw-r--r--nvim/after/plugin/telescope.lua16
-rw-r--r--nvim/after/plugin/todo-txt.lua44
-rw-r--r--nvim/after/plugin/treesitter.lua23
-rw-r--r--nvim/after/plugin/trouble.lua3
-rw-r--r--nvim/after/plugin/undotree.lua2
-rw-r--r--nvim/after/plugin/zenmode.lua30
17 files changed, 0 insertions, 493 deletions
diff --git a/nvim/after/plugin/ale.lua b/nvim/after/plugin/ale.lua
deleted file mode 100644
index da1415c..0000000
--- a/nvim/after/plugin/ale.lua
+++ /dev/null
@@ -1,41 +0,0 @@
--- Set the configuration options for the plugin
-local linters = {
- python = {'ruff'},
- ocaml = {'merlin'},
- cpp = {'clang'},
- yaml = {'yamllint'},
- c = {'clang'},
- go = {'gopls', 'golint', 'gofmt'},
-}
-
-local fixers = {
- python = {'ruff', 'isort', 'yapf', 'black'},
- go = {'gofmt'},
- rust = {'rustfmt'},
-}
-
-local pyright_config = {
- useLibraryCodeForTypes = 1,
- disableLanguageServices = 1,
- autoImportCompletions = 1,
-}
-
-vim.api.nvim_set_var('ale_linters', linters)
-vim.api.nvim_set_var('ale_python_pyright_config', pyright_config)
-vim.api.nvim_set_var('ale_fix_on_save', 1)
-vim.api.nvim_set_var('ale_warn_about_trailing_whitespace', 1)
-vim.api.nvim_set_var('ale_disable_lsp', 1)
-vim.api.nvim_set_var('ale_use_neovim_diagnostics_api', 1)
-vim.api.nvim_set_var('ale_set_quickfix', 1)
-vim.api.nvim_set_var('ale_echo_cursor', 1)
-vim.api.nvim_set_var('ale_echo_msg_error_str', 'Error')
-vim.api.nvim_set_var('ale_echo_msg_form', '%linter% - %code: %%s')
-vim.api.nvim_set_var('ale_loclist_msg_format', '%linter% - %code: %%s')
-vim.api.nvim_set_var('ale_echo_msg_warning_s', 'Warning')
-vim.api.nvim_set_var('ale_fixers', fixers)
-vim.api.nvim_set_var('ale_python_mypy_ignore_invalid_syntax', 1)
-vim.api.nvim_set_var('ale_python_mypy_executable', 'mypy')
-vim.api.nvim_set_var('ale_python_mypy_options', '--config-file mypy.ini')
-vim.api.nvim_set_var('g:ale_sign_error', '>>')
-vim.api.nvim_set_var('ale_fix_on_save', 1)
-vim.api.nvim_set_var('ale_linters_explicit', 0)
diff --git a/nvim/after/plugin/colors.lua b/nvim/after/plugin/colors.lua
deleted file mode 100644
index fe97b1b..0000000
--- a/nvim/after/plugin/colors.lua
+++ /dev/null
@@ -1,14 +0,0 @@
-require('rose-pine').setup({
- disable_background = true
-})
-
-function ColorMyPencils(color)
- color = color or "rose-pine"
- vim.cmd.colorscheme(color)
-
- vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
- vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
-
-end
-
-ColorMyPencils()
diff --git a/nvim/after/plugin/copilot.lua b/nvim/after/plugin/copilot.lua
deleted file mode 100644
index 7ed6529..0000000
--- a/nvim/after/plugin/copilot.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-vim.g.copilot_no_tab_map = true
-vim.api.nvim_set_keymap("i", "<C-J>", 'copilot#Accept("<CR>")', { silent = true, expr = true })
--- not working vim.g.copilot_assume_mapped = true
-
-vim.g.copilot_filetypes = {
- ["*"] = false,
- ["markdown"] = false,
- ["javascript"] = false,
- ["typescript"] = false,
- ["lua"] = true,
- ["rust"] = true,
- ["c"] = true,
- ["c#"] = true,
- ["c++"] = true,
- ["go"] = true,
- ["python"] = true,
-}
diff --git a/nvim/after/plugin/dap.lua b/nvim/after/plugin/dap.lua
deleted file mode 100644
index 495445f..0000000
--- a/nvim/after/plugin/dap.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-local dap = require('dap')
-dap.adapters.python = {
- type = 'executable';
- command = '.venv/bin/python';
- args = { '-m', 'debugpy.adapter' };
-}
-
-vim.keymap.set('n', '<F5>', function() require('dap').continue() end)
-vim.keymap.set('n', '<F10>', function() require('dap').step_over() end)
-vim.keymap.set('n', '<F11>', function() require('dap').step_into() end)
-vim.keymap.set('n', '<F12>', function() require('dap').step_out() end)
-vim.keymap.set('n', '<F9>', function() require('dap').toggle_breakpoint() end)
-vim.keymap.set('n', '<Leader>B', function() require('dap').set_breakpoint() end)
-vim.keymap.set('n', '<Leader>lp', function() require('dap').set_breakpoint(nil, nil, vim.fn.input('Log point message: ')) end)
-vim.keymap.set('n', '<Leader>dr', function() require('dap').repl.open() end)
-vim.keymap.set('n', '<Leader>dl', function() require('dap').run_last() end)
-vim.keymap.set({'n', 'v'}, '<Leader>dh', function()
- require('dap.ui.widgets').hover()
-end)
-vim.keymap.set({'n', 'v'}, '<Leader>dp', function()
- require('dap.ui.widgets').preview()
-end)
-vim.keymap.set('n', '<Leader>df', function()
- local widgets = require('dap.ui.widgets')
- widgets.centered_float(widgets.frames)
-end)
-vim.keymap.set('n', '<Leader>ds', function()
- local widgets = require('dap.ui.widgets')
- widgets.centered_float(widgets.scopes)
-end)
diff --git a/nvim/after/plugin/fugitive.lua b/nvim/after/plugin/fugitive.lua
deleted file mode 100644
index 80c9070..0000000
--- a/nvim/after/plugin/fugitive.lua
+++ /dev/null
@@ -1 +0,0 @@
-vim.keymap.set("n", "<leader>gs", vim.cmd.Git)
diff --git a/nvim/after/plugin/harpoon.lua b/nvim/after/plugin/harpoon.lua
deleted file mode 100644
index 4f57af5..0000000
--- a/nvim/after/plugin/harpoon.lua
+++ /dev/null
@@ -1,10 +0,0 @@
-local mark = require("harpoon.mark")
-local ui = require("harpoon.ui")
-
-vim.keymap.set("n", "<leader>a", mark.add_file)
-vim.keymap.set("n", "<leader>bh", ui.toggle_quick_menu)
-
-vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
-vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
-vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
-vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)
diff --git a/nvim/after/plugin/ledger.lua b/nvim/after/plugin/ledger.lua
deleted file mode 100644
index 6a47935..0000000
--- a/nvim/after/plugin/ledger.lua
+++ /dev/null
@@ -1,4 +0,0 @@
--- easily make a transaction starred with <leader>-
-vim.keymap.set("n", "<leader>-", "<cmd>call ledger#transaction_state_set(line('.'), '*')<CR>")
-
-vim.api.nvim_set_var("ledger_detailed_first", 0)
diff --git a/nvim/after/plugin/lsp.lua b/nvim/after/plugin/lsp.lua
deleted file mode 100644
index e6e2bda..0000000
--- a/nvim/after/plugin/lsp.lua
+++ /dev/null
@@ -1,99 +0,0 @@
-local lsp = require("lsp-zero")
-
-lsp.preset("recommended")
-
-lsp.ensure_installed({
- 'pyright', 'lua_ls'
-})
-
--- Fix Undefined global 'vim'
-lsp.configure('lua_ls', {
- settings = {
- Lua = {
- diagnostics = {
- globals = { 'vim' }
- }
- }
- }
-})
-
-
--- local cmp = require('cmp')
--- local cmp_select = {behavior = cmp.SelectBehavior.Select}
--- local cmp_mappings = lsp.defaults.cmp_mappings({
--- ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select),
--- ['<C-n>'] = cmp.mapping.select_next_item(cmp_select),
--- ['<C-y>'] = cmp.mapping.confirm({ select = true }),
--- ["<C-Space>"] = cmp.mapping.complete(),
--- })
-
--- cmp_mappings['<Tab>'] = nil
--- cmp_mappings['<S-Tab>'] = nil
-
-lsp.setup_nvim_cmp({
- mapping = cmp_mappings
-})
-
-
-lsp.set_preferences({
- suggest_lsp_servers = false,
- sign_icons = {
- error = 'E',
- warn = 'W',
- hint = 'H',
- info = 'I'
- }
-})
-
-lsp.on_attach(function(client, bufnr)
- local opts = {buffer = bufnr, remap = false}
-
- vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts)
- vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts)
- vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts)
- vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts)
- vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts)
- vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts)
- vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts)
- vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts)
- vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts)
- vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts)
-end)
-
-lsp.skip_server_setup({
- 'pylsp',
-})
-
-lsp.setup()
-
-vim.diagnostic.config({
- virtual_text = true
-})
-
--- rnix config
-
-local lspconfig = require'lspconfig'
-lspconfig.nil_ls.setup{
- autostart = true,
- capabilities = require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol.make_client_capabilities()),
- cmd = vim.env.NIL_LSP_PATH,
- settings = {
- rootMarkers = {".git/"},
- languages = {
- nix = {
- formatters = {
- {
- exe = "nixpkgs-fmt",
- args = {}
- }
- },
- linters = {
- {
- exe = "nil_lsp",
- args = {}
- }
- }
- }
- }
- }
-}
diff --git a/nvim/after/plugin/luasnip.lua b/nvim/after/plugin/luasnip.lua
deleted file mode 100644
index 6ff1131..0000000
--- a/nvim/after/plugin/luasnip.lua
+++ /dev/null
@@ -1,46 +0,0 @@
-local has_words_before = function()
- unpack = unpack or table.unpack
- local line, col = unpack(vim.api.nvim_win_get_cursor(0))
- return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
-end
-
-local luasnip = require("luasnip")
-local cmp = require("cmp")
-
-cmp.setup({
-
- -- ... Your other configuration ...
-
- mapping = {
-
- -- ... Your other mappings ...
-
- ["<Tab>"] = cmp.mapping(function(fallback)
- if cmp.visible() then
- cmp.select_next_item()
- -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
- -- they way you will only jump inside the snippet region
- elseif luasnip.expand_or_jumpable() then
- luasnip.expand_or_jump()
- elseif has_words_before() then
- cmp.complete()
- else
- fallback()
- end
- end, { "i", "s" }),
-
- ["<S-Tab>"] = cmp.mapping(function(fallback)
- if cmp.visible() then
- cmp.select_prev_item()
- elseif luasnip.jumpable(-1) then
- luasnip.jump(-1)
- else
- fallback()
- end
- end, { "i", "s" }),
-
- -- ... Your other mappings ...
- },
-
- -- ... Your other configuration ...
-})
diff --git a/nvim/after/plugin/marksman.lua b/nvim/after/plugin/marksman.lua
deleted file mode 100644
index 63865ef..0000000
--- a/nvim/after/plugin/marksman.lua
+++ /dev/null
@@ -1 +0,0 @@
-require'lspconfig'.marksman.setup{}
diff --git a/nvim/after/plugin/neotest-python.lua b/nvim/after/plugin/neotest-python.lua
deleted file mode 100644
index 6637042..0000000
--- a/nvim/after/plugin/neotest-python.lua
+++ /dev/null
@@ -1,112 +0,0 @@
-require("neotest").setup({
- quickfix = {
- open = false,
- enabled = false,
- },
- status = {
- enabled = true,
- signs = true, -- Sign after function signature
- virtual_text = false
- },
- icons = {
- child_indent = "│",
- child_prefix = "├",
- collapsed = "─",
- expanded = "╮",
- failed = "✘",
- final_child_indent = " ",
- final_child_prefix = "╰",
- non_collapsible = "─",
- passed = "✓",
- running = "",
- running_animated = { "/", "|", "\\", "-", "/", "|", "\\", "-" },
- skipped = "↓",
- unknown = ""
- },
- floating = {
- border = "rounded",
- max_height = 0.9,
- max_width = 0.9,
- options = {}
- },
- summary = {
- open = "botright vsplit | vertical resize 60"
- },
- highlights = {
- adapter_name = "NeotestAdapterName",
- border = "NeotestBorder",
- dir = "NeotestDir",
- expand_marker = "NeotestExpandMarker",
- failed = "NeotestFailed",
- file = "NeotestFile",
- focused = "NeotestFocused",
- indent = "NeotestIndent",
- marked = "NeotestMarked",
- namespace = "NeotestNamespace",
- passed = "NeotestPassed",
- running = "NeotestRunning",
- select_win = "NeotestWinSelect",
- skipped = "NeotestSkipped",
- target = "NeotestTarget",
- test = "NeotestTest",
- unknown = "NeotestUnknown"
- },
- adapters = {
- require("neotest-python")({
- -- Extra arguments for nvim-dap configuration
- -- See https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for values
- dap = { justMyCode = false },
- -- Command line arguments for runner
- -- Can also be a function to return dynamic values
- args = {"--log-level", "DEBUG"},
- -- Runner to use. Will use pytest if available by default.
- -- Can be a function to return dynamic value.
- runner = "pytest",
- -- Custom python path for the runner.
- -- Can be a string or a list of strings.
- -- Can also be a function to return dynamic value.
- -- If not provided, the path will be inferred by checking for
- -- virtual envs in the local directory and for Pipenev/Poetry configs
- python = ".venv/bin/python",
- -- Returns if a given file path is a test file.
- -- NB: This function is called a lot so don't perform any heavy tasks within it.
- })
- },
-})
-
-require("neodev").setup({
- library = { plugins = { "neotest" }, types = true },
- ...
-})
-
-vim.keymap.set("n", "tn", function()
- require("neotest").run.run()
-end)
-
-vim.keymap.set("n", "tf", function()
- require("neotest").run.run(vim.fn.expand("%"))
-end)
-
-vim.keymap.set("n", "tr", function()
- local neotest = require("neotest")
- neotest.run.run()
- neotest.summary.open()
-end,
-{ noremap = true, silent = true, nowait = true })
-
-vim.keymap.set("n", "ta", function()
- local neotest = require("neotest")
- neotest.run.attach()
-end)
-
-vim.keymap.set("n", "to", function()
- local neotest = require("neotest")
- neotest.output.open({ last_run = true, enter = true })
-end,
-{ noremap = true, silent = true, nowait = true })
-
-vim.keymap.set("n", "tt", function()
- local neotest = require("neotest")
- neotest.summary.toggle()
-end,
-{ noremap = true, silent = true, nowait = true })
diff --git a/nvim/after/plugin/telescope.lua b/nvim/after/plugin/telescope.lua
deleted file mode 100644
index a004f9d..0000000
--- a/nvim/after/plugin/telescope.lua
+++ /dev/null
@@ -1,16 +0,0 @@
-local builtin = require('telescope.builtin')
-vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
-vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
-vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
-vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
-vim.keymap.set('n', '<leader>fs', builtin.grep_string, {})
-vim.keymap.set('n', '<leader>fc', builtin.command_history, {})
-vim.keymap.set('n', '<leader>fk', builtin.keymaps, {})
-vim.keymap.set('n', '<leader>fl', builtin.diagnostics, {})
-vim.keymap.set('n', '<leader>fo', builtin.builtin, {})
-
-vim.keymap.set('n', '<leader>ps', function()
- builtin.grep_string({ search = vim.fn.input("Grep > ") })
-end)
-
-require("telescope").load_extension("emoji")
diff --git a/nvim/after/plugin/todo-txt.lua b/nvim/after/plugin/todo-txt.lua
deleted file mode 100644
index 09be576..0000000
--- a/nvim/after/plugin/todo-txt.lua
+++ /dev/null
@@ -1,44 +0,0 @@
-require('todotxt-nvim').setup({
- todo_file = "/home/lemon/Documents/Notes/todo/todo.txt",
- capture = {
- alternative_priority = {
- A = "today",
- B = "tomorrow",
- C = "this week",
- D = "next week",
- E = "next month",
- },
- },
- highlights = {
- priorities = {
- A = {
- fg = "yellow",
- bg = "NONE",
- style = "bold",
- },
- B = {
- fg = "green",
- bg = "NONE",
- style = "bold",
- },
- C = {
- fg = "cyan",
- bg = "NONE",
- style = "bold",
- },
- D = {
- fg = "magenta",
- bg = "NONE",
- style = "bold",
- },
- },
- },
- sidebar = {
- width = 70,
- position = "right", -- default: "right"
- },
-})
-
--- Keyboard shortcuts for todotxt-nvim.
-vim.keymap.set("n", "<localleader>tp", "<cmd>ToDoTxtTasksToggle<CR>")
-vim.keymap.set("n", "<localleader>ta", "<cmd>ToDoTxtCapture<CR>")
diff --git a/nvim/after/plugin/treesitter.lua b/nvim/after/plugin/treesitter.lua
deleted file mode 100644
index 69adc98..0000000
--- a/nvim/after/plugin/treesitter.lua
+++ /dev/null
@@ -1,23 +0,0 @@
-require'nvim-treesitter.configs'.setup {
- -- A list of parser names, or "all"
- ensure_installed = { "python", "bash", "javascript", "typescript", "c", "lua", "rust" },
-
- -- 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,
-
- highlight = {
- -- `false` will disable the whole extension
- enable = true,
-
- -- 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/nvim/after/plugin/trouble.lua b/nvim/after/plugin/trouble.lua
deleted file mode 100644
index cf1256a..0000000
--- a/nvim/after/plugin/trouble.lua
+++ /dev/null
@@ -1,3 +0,0 @@
-vim.keymap.set("n", "<leader>xq", "<cmd>TroubleToggle quickfix<cr>",
- {silent = true, noremap = true}
-)
diff --git a/nvim/after/plugin/undotree.lua b/nvim/after/plugin/undotree.lua
deleted file mode 100644
index 97bb7ab..0000000
--- a/nvim/after/plugin/undotree.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-vim.keymap.set("n", "<leader>u", vim.cmd.UndotreeToggle)
-
diff --git a/nvim/after/plugin/zenmode.lua b/nvim/after/plugin/zenmode.lua
deleted file mode 100644
index 753fbf8..0000000
--- a/nvim/after/plugin/zenmode.lua
+++ /dev/null
@@ -1,30 +0,0 @@
-
-vim.keymap.set("n", "<leader>zz", function()
- require("zen-mode").setup {
- window = {
- width = 90,
- options = { }
- },
- }
- require("zen-mode").toggle()
- vim.wo.wrap = false
- vim.wo.number = true
- vim.wo.rnu = true
- ColorMyPencils()
-end)
-
-
-vim.keymap.set("n", "<leader>zZ", function()
- require("zen-mode").setup {
- window = {
- width = 80,
- options = { }
- },
- }
- require("zen-mode").toggle()
- vim.wo.wrap = false
- vim.wo.number = false
- vim.wo.rnu = false
- vim.opt.colorcolumn = "0"
- ColorMyPencils()
-end)