diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua new file mode 100644 index 00000000..145e9e73 --- /dev/null +++ b/after/ftplugin/c.lua @@ -0,0 +1 @@ +vim.opt.shiftwidth = 2 diff --git a/lua/angryluck/plugins/conform.lua b/lua/angryluck/plugins/conform.lua index 680d1803..071584b6 100644 --- a/lua/angryluck/plugins/conform.lua +++ b/lua/angryluck/plugins/conform.lua @@ -15,9 +15,12 @@ return { -- Autoformat formatters_by_ft = { lua = { "stylua" }, haskell = { "fourmolu" }, + -- haskell = { "ormolu" }, json = { "jq" }, + c = { "clang-format" }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, + python = { "autopep8", "black" }, -- -- You can use a sub-list to tell conform to run *until* a formatter is found. -- javascript = { { "prettierd", "prettier" } }, diff --git a/lua/angryluck/plugins/init.lua b/lua/angryluck/plugins/init.lua index acb1c745..fd7a6746 100644 --- a/lua/angryluck/plugins/init.lua +++ b/lua/angryluck/plugins/init.lua @@ -82,6 +82,10 @@ return { opts = { signs = false }, }, + -- F# syntax/lsp + -- + "ionide/Ionide-vim", + -- [ GRAVEYARD ] -- Plugins I don't use anymore -------------------------------------------------- diff --git a/lua/angryluck/plugins/isabelle-lsp.lua b/lua/angryluck/plugins/isabelle-lsp.lua new file mode 100644 index 00000000..78b21816 --- /dev/null +++ b/lua/angryluck/plugins/isabelle-lsp.lua @@ -0,0 +1,17 @@ +return { + { + "Treeniks/isabelle-lsp.nvim", + branch = "isabelle-language-server", + dependencies = { + "neovim/nvim-lspconfig", + }, + config = function() + require("isabelle-lsp").setup({ + isabelle_path = "/home/angryluck/isabelle-lsp/isabelle-emacs/bin/isabelle", + }) + local lspconfig = require("lspconfig") + lspconfig.isabelle.setup({}) + end, + }, + "Treeniks/isabelle-syn.nvim", +} diff --git a/lua/angryluck/plugins/lsp.lua b/lua/angryluck/plugins/lsp.lua index 6dcb95fe..f16ac900 100644 --- a/lua/angryluck/plugins/lsp.lua +++ b/lua/angryluck/plugins/lsp.lua @@ -135,19 +135,20 @@ return { -- LSP Configuration & Plugins }, }, }, - ltex = { - filetypes = { "tex" }, - settings = { - dictionary = { - ["en-US"] = { "homotopy" }, - }, - }, - }, + -- ltex = { + -- filetypes = { "tex" }, + -- settings = { + -- dictionary = { + -- ["en-US"] = { "homotopy" }, + -- }, + -- }, + -- }, hls = { filetypes = { "haskell", "lhaskell", "cabal" }, haskell = { cabalFormattingProvider = "cabalfmt", formattingProvider = "fourmolu", + -- formattingProvider = "ormolu", }, single_file_suppport = true, }, diff --git a/lua/angryluck/plugins/treesitter.lua b/lua/angryluck/plugins/treesitter.lua index f7d9f2d1..bf415479 100644 --- a/lua/angryluck/plugins/treesitter.lua +++ b/lua/angryluck/plugins/treesitter.lua @@ -16,11 +16,11 @@ return { "bash", "c", "haskell", - "lua", + -- "lua", "vim", "vimdoc", -- "org", - "norg", + -- "norg", "markdown", }, ignore_install = { "latex" }, @@ -108,7 +108,8 @@ return { }, refactor = { highlight_definitions = { - enable = true, + -- enable = true, + enable = false, -- Set to false if you have an `updatetime` of ~100. clear_on_cursor_move = true, }, diff --git a/lua/angryluck/plugins/vim-orgmode.lua b/lua/angryluck/plugins/vim-orgmode.lua index ea171346..92755da3 100644 --- a/lua/angryluck/plugins/vim-orgmode.lua +++ b/lua/angryluck/plugins/vim-orgmode.lua @@ -1,83 +1,83 @@ return { - "nvim-orgmode/orgmode", - dependencies = { - { - "nvim-treesitter/nvim-treesitter", - lazy = true, - config = function() - -- Setup treesitter - require("nvim-treesitter.configs").setup { - highlight = { - enable = true, - }, - ensure_installed = { "org" }, - } - end, - }, - { - "akinsho/org-bullets.nvim", - config = function() - require("org-bullets").setup() - end, - }, - -- "joaomsa/telescope-orgmode.nvim", - -- "nvim-telescope/telescope.nvim", - -- { - -- "lukas-reineke/headlines.nvim", - -- dependencies = "nvim-treesitter/nvim-treesitter", - -- config = function() - -- vim.cmd [[highlight Headline1 guibg=#1e2718]] - -- vim.cmd [[highlight Headline2 guibg=#21262d]] - -- vim.cmd [[highlight CodeBlock guibg=#1c1c1c]] - -- vim.cmd [[highlight Dash guibg=#D19A66 gui=bold]] - -- - -- require("headlines").setup { - -- org = { - -- headline_highlights = { "Headline1", "Headline2" }, - -- }, - -- } - -- end, -- or `opts = {}` - -- }, - }, - -- ADD THIS BACK LATER - SOMETHING WRONG, SO DOESNT START - -- event = 'VeryLazy', - config = function() - -- Load treesitter grammar for org - -- require("orgmode").setup_ts_grammar() - -- require("telescope").load_extension "orgmode" - - -- vim.api.nvim_create_autocmd("FileType", { - -- pattern = "org", - -- group = vim.api.nvim_create_augroup("orgmode_telescope_nvim", { clear = true }), - -- callback = function() - -- vim.keymap.set("n", "or", require("telescope").extensions.orgmode.refile_heading) - -- end, - -- }) - - -- Setup orgmode - require("orgmode").setup { - org_agenda_files = { "~/documents/orgfiles/**/*", "~/gtd/**/*" }, - -- org_default_notes_file = "~/documents/orgfiles/refile.org", - org_default_notes_file = "~/gtd/inbox.org", - org_archive_location = "~/gtd/archive/%s_archive::", - org_todo_keywords = { - "NEXT(n)", - "TODO(t)", - "WAITING(w)", - -- "SCHEDULED(s)", - "|", - "DONE(d)", - "CANCELLED(c)", - }, - -- org_hide_leading_stars = true, - mappings = { - capture = { - org_capture_finalize = "ow", - }, - note = { - org_note_finalize = "ow", - }, - }, - } - end, + -- "nvim-orgmode/orgmode", + -- dependencies = { + -- { + -- "nvim-treesitter/nvim-treesitter", + -- lazy = true, + -- config = function() + -- -- Setup treesitter + -- require("nvim-treesitter.configs").setup { + -- highlight = { + -- enable = true, + -- }, + -- ensure_installed = { "org" }, + -- } + -- end, + -- }, + -- { + -- "akinsho/org-bullets.nvim", + -- config = function() + -- require("org-bullets").setup() + -- end, + -- }, + -- -- "joaomsa/telescope-orgmode.nvim", + -- -- "nvim-telescope/telescope.nvim", + -- -- { + -- -- "lukas-reineke/headlines.nvim", + -- -- dependencies = "nvim-treesitter/nvim-treesitter", + -- -- config = function() + -- -- vim.cmd [[highlight Headline1 guibg=#1e2718]] + -- -- vim.cmd [[highlight Headline2 guibg=#21262d]] + -- -- vim.cmd [[highlight CodeBlock guibg=#1c1c1c]] + -- -- vim.cmd [[highlight Dash guibg=#D19A66 gui=bold]] + -- -- + -- -- require("headlines").setup { + -- -- org = { + -- -- headline_highlights = { "Headline1", "Headline2" }, + -- -- }, + -- -- } + -- -- end, -- or `opts = {}` + -- -- }, + -- }, + -- -- ADD THIS BACK LATER - SOMETHING WRONG, SO DOESNT START + -- -- event = 'VeryLazy', + -- config = function() + -- -- Load treesitter grammar for org + -- -- require("orgmode").setup_ts_grammar() + -- -- require("telescope").load_extension "orgmode" + -- + -- -- vim.api.nvim_create_autocmd("FileType", { + -- -- pattern = "org", + -- -- group = vim.api.nvim_create_augroup("orgmode_telescope_nvim", { clear = true }), + -- -- callback = function() + -- -- vim.keymap.set("n", "or", require("telescope").extensions.orgmode.refile_heading) + -- -- end, + -- -- }) + -- + -- -- Setup orgmode + -- require("orgmode").setup { + -- org_agenda_files = { "~/documents/orgfiles/**/*", "~/gtd/**/*" }, + -- -- org_default_notes_file = "~/documents/orgfiles/refile.org", + -- org_default_notes_file = "~/gtd/inbox.org", + -- org_archive_location = "~/gtd/archive/%s_archive::", + -- org_todo_keywords = { + -- "NEXT(n)", + -- "TODO(t)", + -- "WAITING(w)", + -- -- "SCHEDULED(s)", + -- "|", + -- "DONE(d)", + -- "CANCELLED(c)", + -- }, + -- -- org_hide_leading_stars = true, + -- mappings = { + -- capture = { + -- org_capture_finalize = "ow", + -- }, + -- note = { + -- org_note_finalize = "ow", + -- }, + -- }, + -- } + -- end, } diff --git a/lua/angryluck/plugins/which-key.lua b/lua/angryluck/plugins/which-key.lua index fdd9027c..6ba3ce90 100644 --- a/lua/angryluck/plugins/which-key.lua +++ b/lua/angryluck/plugins/which-key.lua @@ -1,13 +1,20 @@ return { -- Shows pending keybinds "folke/which-key.nvim", event = "VimEnter", + opts = { + popup_mappings = { + scroll_down = "", + scroll_up = "", + }, + }, + config = function() require("which-key").setup({ -- Remove this if so many keymaps, that you need to scroll - popup_mappings = { - scroll_down = "", - scroll_up = "", - }, + -- popup_mappings = { + -- scroll_down = "", + -- scroll_up = "", + -- }, -- Doesn't work -- trigger_blacklist = { -- v = { "j", "k", "", "" }, @@ -15,14 +22,26 @@ return { -- Shows pending keybinds }) -- Document existing key chains - require("which-key").register({ + require("which-key").add({ -- Naming leader-key-groups - ["c"] = { name = "[C]ode", _ = "which_key_ignore" }, - ["d"] = { name = "[D]ocument", _ = "which_key_ignore" }, - ["r"] = { name = "[R]ename", _ = "which_key_ignore" }, - ["s"] = { name = "[S]earch", _ = "which_key_ignore" }, - ["w"] = { name = "[W]orkspace", _ = "which_key_ignore" }, - ["o"] = { name = "[O]rgmode", _ = "which_key_ignore" }, + { "c", group = "[C]ode" }, + { "c_", hidden = true }, + { "d", group = "[D]ocument" }, + { "d_", hidden = true }, + { "o", group = "[O]rgmode" }, + { "o_", hidden = true }, + { "r", group = "[R]ename" }, + { "r_", hidden = true }, + { "s", group = "[S]earch" }, + { "s_", hidden = true }, + { "w", group = "[W]orkspace" }, + -- old: require("which-key").register: + -- ["c"] = { name = "[C]ode", _ = "which_key_ignore" }, + -- ["d"] = { name = "[D]ocument", _ = "which_key_ignore" }, + -- ["r"] = { name = "[R]ename", _ = "which_key_ignore" }, + -- ["s"] = { name = "[S]earch", _ = "which_key_ignore" }, + -- ["w"] = { name = "[W]orkspace", _ = "which_key_ignore" }, + -- ["o"] = { name = "[O]rgmode", _ = "which_key_ignore" }, }) end, }