From de041f1e0a690fac1e085c9a9f9edfbafa1f8524 Mon Sep 17 00:00:00 2001 From: afonso Date: Sat, 30 Mar 2024 16:08:40 +0000 Subject: [PATCH] [nvim] updated config --- .config/nvim/ftdetect/sage.vim | 5 +++ .config/nvim/lazy-lock.json | 51 +++++++++++++------------- .config/nvim/lua/plugins/cmp.lua | 8 ---- .config/nvim/lua/plugins/conform.lua | 5 +-- .config/nvim/lua/plugins/lazy.lua | 14 ++++--- .config/nvim/lua/plugins/lspconfig.lua | 42 +++++++++++++++------ 6 files changed, 71 insertions(+), 54 deletions(-) create mode 100644 .config/nvim/ftdetect/sage.vim diff --git a/.config/nvim/ftdetect/sage.vim b/.config/nvim/ftdetect/sage.vim new file mode 100644 index 0000000..50c57ad --- /dev/null +++ b/.config/nvim/ftdetect/sage.vim @@ -0,0 +1,5 @@ + +augroup SageDetect + au! + au BufRead,BufNewFile *sage set ft=python +augroup END diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 2d12d4d..9af777b 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,56 +1,57 @@ { "LuaSnip": { "branch": "master", "commit": "a7a4b4682c4b3e2ba82b82a4e6e5f5a0e79dec32" }, - "catppuccin": { "branch": "main", "commit": "c0de3b46811fe1ce3912e2245a9dfbea6b41c300" }, - "cinnamon.nvim": { "branch": "master", "commit": "c406ffda3a0302f32c23b24ab756ea20467d6578" }, + "catppuccin": { "branch": "main", "commit": "07679af1af4f446655682ee2557b5840ac551504" }, + "cinnamon.nvim": { "branch": "master", "commit": "559fe02fae00ffd78377e9c242b2faa25a428592" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, + "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "34b81e70da83e26c048290204de44268eb59814e" }, + "conform.nvim": { "branch": "master", "commit": "f9523f75134614fc0eff29c2377ed36603a1b0aa" }, "copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" }, - "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" }, - "fidget.nvim": { "branch": "main", "commit": "60404ba67044c6ab01894dd5bf77bd64ea5e09aa" }, + "dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" }, + "fidget.nvim": { "branch": "main", "commit": "933db4596e4bab1b09b6d48a10e21819e4cc458f" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, - "gruvbox-material": { "branch": "master", "commit": "b17fe51688b76e2ccf118e5f76f3978b9a8c503e" }, + "gruvbox-material": { "branch": "master", "commit": "c7c95a97702038e83c73e207f937263d4e7a2be8" }, "impatient.nvim": { "branch": "main", "commit": "47302af74be7b79f002773011f0d8e85679a7618" }, "instant.nvim": { "branch": "master", "commit": "294b6d08143b3db8f9db7f606829270149e1a786" }, "jq.nvim": { "branch": "master", "commit": "b9879798f25a9318894456dc7464af0904c08958" }, - "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, + "lazy.nvim": { "branch": "main", "commit": "08954f723bf2d442ea020551e3acc956f4dc6dc7" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "ltex-extra.nvim": { "branch": "master", "commit": "42dd3572cb09b52a137e91e515f2dff5eb631b1e" }, - "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "21d33d69a81f6351e5a5f49078b2e4f0075c8e73" }, + "lualine.nvim": { "branch": "master", "commit": "b5e8bb642138f787a2c1c5aedc2a78cb2cebbd67" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9dfcf2036c223920826140f0151d929a43f9eceb" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "67210c0e775adec55de9826b038e8b62de554afc" }, - "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" }, - "nvim-autopairs": { "branch": "master", "commit": "c6139ca0d5ad7af129ea6c89cb4c56093f2c034a" }, - "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, + "nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" }, + "nvim-cmp": { "branch": "main", "commit": "97dc716fc914c46577a4f254035ebef1aa72558a" }, "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" }, - "nvim-dap": { "branch": "master", "commit": "fc880e82059eb21c0fa896be60146e5f17680648" }, - "nvim-dap-ui": { "branch": "master", "commit": "9720eb5fa2f41988e8770f973cd11b76dd568a5d" }, + "nvim-dap": { "branch": "master", "commit": "405df1dcc2e395ab5173a9c3d00e03942c023074" }, + "nvim-dap-ui": { "branch": "master", "commit": "edfa93f60b189e5952c016eee262d0685d838450" }, "nvim-ghost.nvim": { "branch": "main", "commit": "a1ca0b2dac59881066d7ac9373cf64d59ba29d6a" }, - "nvim-lspconfig": { "branch": "master", "commit": "c932a56bf25167b1e88d2a1ebe35bb774b41019a" }, + "nvim-lspconfig": { "branch": "master", "commit": "6e5c78ebc9936ca74add66bda22c566f951b6ee5" }, + "nvim-nio": { "branch": "master", "commit": "33c62b3eadd8154169e42144de16ba4db6784bec" }, "nvim-tmux-navigation": { "branch": "main", "commit": "4898c98702954439233fdaf764c39636681e2861" }, - "nvim-treesitter": { "branch": "master", "commit": "63ca90eaa3ce1cc668add8828a9e3d6728dbbdf1" }, - "nvim-treesitter-context": { "branch": "master", "commit": "b8d1ffe58a88e0356da56b167373e89c4579ce15" }, - "nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" }, - "oil.nvim": { "branch": "master", "commit": "c437f3c5b0da0a9cc6a222d87212cce11b80ba75" }, + "nvim-treesitter": { "branch": "master", "commit": "1c3fb9eac2a04230e4af23715fa2c190cbeacd70" }, + "nvim-treesitter-context": { "branch": "master", "commit": "f19766163c18515fb4d3c12d572bf9cba6cdb990" }, + "nvim-web-devicons": { "branch": "master", "commit": "3ee60deaa539360518eaab93a6c701fe9f4d82ef" }, + "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" }, "pastify.nvim": { "branch": "main", "commit": "47317b9bb7bf5fb7dfd994a6eb9bec8f00628dc0" }, - "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, + "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, - "rustaceanvim": { "branch": "master", "commit": "44465eec3c1b9f7c6620274218fd8e9e60d6618e" }, "telescope.nvim": { "branch": "master", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" }, "tla.nvim": { "branch": "master", "commit": "e419c75e805ab6d9967c7325bf35734c372d3d4b" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, - "typst.vim": { "branch": "main", "commit": "ff57d27cf5ee7427941a63fb537714f9a80e0246" }, - "undotree": { "branch": "master", "commit": "9dbbf3b7d19dda0d22ceca461818e4739ad8154d" }, + "typst.vim": { "branch": "main", "commit": "86e4fa8dcddd032f9fdbf04602417a8baac8fed3" }, + "undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" }, "vim-alloy": { "branch": "master", "commit": "5bd57c4890be39e221dd3e1f6735457dce454bbd" }, "vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" }, + "vim-commentary": { "branch": "master", "commit": "f67e3e67ea516755005e6cccb178bc8439c6d402" }, "vim-jukit": { "branch": "master", "commit": "73214c9a8abc4b6aa7a6266b5bc2ddbf8b3e3c00" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "vim-tpipeline": { "branch": "master", "commit": "649f079a0bee19565978b82b672d831c6641d952" }, - "vimtex": { "branch": "master", "commit": "0cb12b4092cca1e5328a181c76b3ab8c088d52f1" }, + "vimtex": { "branch": "master", "commit": "73605f8b7655301ea47a2c355500ab4984f41b91" }, "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" } } \ No newline at end of file diff --git a/.config/nvim/lua/plugins/cmp.lua b/.config/nvim/lua/plugins/cmp.lua index cd47cce..fa390ac 100644 --- a/.config/nvim/lua/plugins/cmp.lua +++ b/.config/nvim/lua/plugins/cmp.lua @@ -19,14 +19,6 @@ if not lspkind_status_ok then return end -cmp.event:on("menu_opened", function() - vim.b.copilot_suggestion_hidden = true -end) - -cmp.event:on("menu_closed", function() - vim.b.copilot_suggestion_hidden = false -end) - -- 󰃐 󰆩 󰙅 󰛡  󰅲 some other good icons local kind_icons = { Text = "󰉿", diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua index 142fac8..e826827 100644 --- a/.config/nvim/lua/plugins/conform.lua +++ b/.config/nvim/lua/plugins/conform.lua @@ -4,8 +4,5 @@ require("conform").setup({ javascript = { "prettierd" }, markdown = { "mdformat" }, json = {"jq"} - }, - format_on_save = { - lsp_fallback = true, - }, + } }) diff --git a/.config/nvim/lua/plugins/lazy.lua b/.config/nvim/lua/plugins/lazy.lua index b2e7a37..615778c 100644 --- a/.config/nvim/lua/plugins/lazy.lua +++ b/.config/nvim/lua/plugins/lazy.lua @@ -156,7 +156,7 @@ lazy.setup({ { "rcarriga/nvim-dap-ui", event = "VeryLazy", - dependencies = "mfussenegger/nvim-dap", + dependencies = {"mfussenegger/nvim-dap","nvim-neotest/nvim-nio"}, config = function() local dap = require("dap") local dapui = require("dapui") @@ -220,11 +220,13 @@ lazy.setup({ end, }, - { - "mrcjkb/rustaceanvim", - version = "^4", -- Recommended - ft = { "rust" }, - }, + 'tpope/vim-commentary', + + -- { + -- "mrcjkb/rustaceanvim", + -- version = "^4", -- Recommended + -- ft = { "rust" }, + -- }, "barreiroleo/ltex-extra.nvim", diff --git a/.config/nvim/lua/plugins/lspconfig.lua b/.config/nvim/lua/plugins/lspconfig.lua index 5a831d0..da6593e 100644 --- a/.config/nvim/lua/plugins/lspconfig.lua +++ b/.config/nvim/lua/plugins/lspconfig.lua @@ -15,6 +15,9 @@ vim.api.nvim_create_autocmd("LspAttach", { local telescope = require("telescope.builtin") local conform = require("conform") + local client = vim.lsp.get_client_by_id(ev.data.client_id) + client.server_capabilities.semanticTokensProvider = nil + -- Mappings. -- See `:help vim.lsp.*` for documentation on any of the below functions local bufopts = { noremap = true, silent = true, buffer = ev.buf } @@ -62,12 +65,6 @@ mason_lspconfig.setup_handlers({ }, }) end, - ["hls"] = function() - lspconfig["hls"].setup({ - capabilities = capabilities, - filetypes = { 'haskell', 'lhaskell', 'cabal' }, - }) - end, ["ltex"] = function() lspconfig["ltex"].setup({ capabilities = capabilities, @@ -77,15 +74,38 @@ mason_lspconfig.setup_handlers({ require("ltex_extra").setup() end, }) + end, + ["basedpyright"] = function () + lspconfig["basedpyright"].setup({ + capabilities = capabilities, + settings = { + verboseOutput = true, + autoImportCompletion = true, + basedpyright = { + analysis = { + typeCheckingMode = "all", + autoSearchPaths = true, + useLibraryCodeForTypes = true, + diagnosticMode = "openFilesOnly", + indexing = true, + }, + }, + }, + }) end +}) +lspconfig["hls"].setup({ + capabilities = capabilities, + filetypes = { 'haskell', 'lhaskell', 'cabal' }, }) -vim.g.rustaceanvim = { - server = { - capabilities = capabilities, - }, -} + +--vim.g.rustaceanvim = { +-- server = { +-- capabilities = capabilities, +-- }, +--}