From 44a8ed456670c0f94ee084abeeb20206fb277fce Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 9 Apr 2023 21:53:34 +0100 Subject: Removes markdown from Copilot for now --- nvim/after/plugin/copilot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nvim') diff --git a/nvim/after/plugin/copilot.lua b/nvim/after/plugin/copilot.lua index f993a93..7ed6529 100644 --- a/nvim/after/plugin/copilot.lua +++ b/nvim/after/plugin/copilot.lua @@ -4,7 +4,7 @@ vim.api.nvim_set_keymap("i", "", 'copilot#Accept("")', { silent = true, vim.g.copilot_filetypes = { ["*"] = false, - ["markdown"] = true, + ["markdown"] = false, ["javascript"] = false, ["typescript"] = false, ["lua"] = true, -- cgit v1.2.3 From 4697490a836598df78189e679e2e4fad8522bc3a Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 9 Apr 2023 21:54:11 +0100 Subject: Removes ThePrimeagen bindings from LSP for now --- nvim/after/plugin/lsp.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'nvim') diff --git a/nvim/after/plugin/lsp.lua b/nvim/after/plugin/lsp.lua index c54e03b..2ef1bfa 100644 --- a/nvim/after/plugin/lsp.lua +++ b/nvim/after/plugin/lsp.lua @@ -18,17 +18,17 @@ lsp.configure('lua_ls', { }) -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.complete(), -}) +-- 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.complete(), +-- }) -cmp_mappings[''] = nil -cmp_mappings[''] = nil +-- cmp_mappings[''] = nil +-- cmp_mappings[''] = nil lsp.setup_nvim_cmp({ mapping = cmp_mappings -- cgit v1.2.3 From 8d1bc5fbb714cc43f4ab68b961dfb674ee969c65 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 9 Apr 2023 21:54:35 +0100 Subject: Reconfigures telescope, adding bindings --- nvim/after/plugin/telescope.lua | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'nvim') diff --git a/nvim/after/plugin/telescope.lua b/nvim/after/plugin/telescope.lua index 29f5a62..a004f9d 100644 --- a/nvim/after/plugin/telescope.lua +++ b/nvim/after/plugin/telescope.lua @@ -1,8 +1,16 @@ local builtin = require('telescope.builtin') -vim.keymap.set('n', 'pf', builtin.find_files, {}) -vim.keymap.set('n', '', builtin.git_files, {}) +vim.keymap.set('n', 'ff', builtin.find_files, {}) +vim.keymap.set('n', 'fg', builtin.live_grep, {}) +vim.keymap.set('n', 'fb', builtin.buffers, {}) +vim.keymap.set('n', 'fh', builtin.help_tags, {}) +vim.keymap.set('n', 'fs', builtin.grep_string, {}) +vim.keymap.set('n', 'fc', builtin.command_history, {}) +vim.keymap.set('n', 'fk', builtin.keymaps, {}) +vim.keymap.set('n', 'fl', builtin.diagnostics, {}) +vim.keymap.set('n', 'fo', builtin.builtin, {}) + vim.keymap.set('n', 'ps', function() builtin.grep_string({ search = vim.fn.input("Grep > ") }) end) -vim.keymap.set('n', 'vh', builtin.help_tags, {}) +require("telescope").load_extension("emoji") -- cgit v1.2.3 From b6704dd95e076023797299fd7de7cf40f1ba8b10 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 9 Apr 2023 21:55:02 +0100 Subject: Adds emoji package to telescope --- nvim/lua/lemon/packer.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'nvim') diff --git a/nvim/lua/lemon/packer.lua b/nvim/lua/lemon/packer.lua index d63cadc..8869f70 100644 --- a/nvim/lua/lemon/packer.lua +++ b/nvim/lua/lemon/packer.lua @@ -29,6 +29,7 @@ return require('packer').startup(function(use) -- or , branch = '0.1.x', requires = { {'nvim-lua/plenary.nvim'} } } + use('xiyaowong/telescope-emoji.nvim') use({ 'rose-pine/neovim', -- cgit v1.2.3 From c5a173d97e4892bf90a867d5c4bfca1d95ab3d12 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 9 Apr 2023 21:55:47 +0100 Subject: Adds marksman config --- nvim/after/plugin/marksman.lua | 1 + 1 file changed, 1 insertion(+) create mode 100644 nvim/after/plugin/marksman.lua (limited to 'nvim') diff --git a/nvim/after/plugin/marksman.lua b/nvim/after/plugin/marksman.lua new file mode 100644 index 0000000..63865ef --- /dev/null +++ b/nvim/after/plugin/marksman.lua @@ -0,0 +1 @@ +require'lspconfig'.marksman.setup{} -- cgit v1.2.3 From 0649a7f18f4241570183c9dcf473fed04c66977f Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 10 Apr 2023 17:39:49 +0100 Subject: Adds back ale config for Python --- nvim/after/plugin/ale.lua | 41 +++++++++++++++++++++++++++++++++++++++++ nvim/after/plugin/lsp.lua | 7 ++++++- nvim/lua/lemon/packer.lua | 1 + nvim/lua/lemon/set.lua | 1 + 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 nvim/after/plugin/ale.lua (limited to 'nvim') diff --git a/nvim/after/plugin/ale.lua b/nvim/after/plugin/ale.lua new file mode 100644 index 0000000..da1415c --- /dev/null +++ b/nvim/after/plugin/ale.lua @@ -0,0 +1,41 @@ +-- 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/lsp.lua b/nvim/after/plugin/lsp.lua index 2ef1bfa..5ab64d1 100644 --- a/nvim/after/plugin/lsp.lua +++ b/nvim/after/plugin/lsp.lua @@ -34,8 +34,9 @@ lsp.setup_nvim_cmp({ mapping = cmp_mappings }) + lsp.set_preferences({ - suggest_lsp_servers = true, + suggest_lsp_servers = false, sign_icons = { error = 'E', warn = 'W', @@ -59,6 +60,10 @@ lsp.on_attach(function(client, bufnr) vim.keymap.set("i", "", function() vim.lsp.buf.signature_help() end, opts) end) +lsp.skip_server_setup({ + 'pylsp', +}) + lsp.setup() vim.diagnostic.config({ diff --git a/nvim/lua/lemon/packer.lua b/nvim/lua/lemon/packer.lua index 8869f70..b9d8782 100644 --- a/nvim/lua/lemon/packer.lua +++ b/nvim/lua/lemon/packer.lua @@ -19,6 +19,7 @@ local packer_bootstrap = ensure_packer() return require('packer').startup(function(use) -- Packer can manage itself use 'wbthomason/packer.nvim' + use 'dense-analysis/ale' use { 'arnarg/todotxt.nvim', requires = {'MunifTanjim/nui.nvim'}, diff --git a/nvim/lua/lemon/set.lua b/nvim/lua/lemon/set.lua index 4347474..3c662a9 100644 --- a/nvim/lua/lemon/set.lua +++ b/nvim/lua/lemon/set.lua @@ -7,6 +7,7 @@ vim.opt.tabstop = 4 vim.opt.softtabstop = 4 vim.opt.shiftwidth = 4 vim.opt.expandtab = true +vim.opt.autoindent = true vim.opt.smartindent = true -- cgit v1.2.3