Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false
vim.g.have_nerd_font = true

-- [[ Setting options ]]
-- See `:help vim.o`
Expand Down Expand Up @@ -121,7 +121,7 @@ end)
-- Enable break indent
vim.o.breakindent = true

-- Save undo history
-- Save undo historyxml
vim.o.undofile = true

-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
Expand Down Expand Up @@ -185,10 +185,10 @@ vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagn
vim.keymap.set('t', '<Esc><Esc>', '<C-\\><C-n>', { desc = 'Exit terminal mode' })

-- TIP: Disable arrow keys in normal mode
-- vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
-- vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
-- vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
-- vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
vim.keymap.set('n', '<left>', '<cmd>echo "Use h to move!!"<CR>')
vim.keymap.set('n', '<right>', '<cmd>echo "Use l to move!!"<CR>')
vim.keymap.set('n', '<up>', '<cmd>echo "Use k to move!!"<CR>')
vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')

-- Keybinds to make split navigation easier.
-- Use CTRL+<hjkl> to switch between windows
Expand Down Expand Up @@ -380,6 +380,7 @@ require('lazy').setup({

-- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font },
{ 'nvim-telescope/telescope-live-grep-args.nvim' },
},
config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that
Expand Down Expand Up @@ -423,6 +424,7 @@ require('lazy').setup({
-- Enable Telescope extensions if they are installed
pcall(require('telescope').load_extension, 'fzf')
pcall(require('telescope').load_extension, 'ui-select')
pcall(require('telescope').load_extension, 'live_grep_args')

-- See `:help telescope.builtin`
local builtin = require 'telescope.builtin'
Expand Down Expand Up @@ -450,6 +452,7 @@ require('lazy').setup({
-- See `:help telescope.builtin.live_grep()` for information about particular keys
vim.keymap.set('n', '<leader>s/', function()
builtin.live_grep {
live_grep_args = { '--hidden', '--glob' },
grep_open_files = true,
prompt_title = 'Live Grep in Open Files',
}
Expand Down Expand Up @@ -484,7 +487,19 @@ require('lazy').setup({
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
{ 'mason-org/mason.nvim', opts = {} },
'mason-org/mason-lspconfig.nvim',
'WhoIsSethDaniel/mason-tool-installer.nvim',
{
'WhoIsSethDaniel/mason-tool-installer.nvim',
opts = {
ensure_installed = {
'clangd',
'lemminx',
'pyright',
'ruff-lsp',
'checkmake',
'make-language-server',
},
},
},

-- Useful status updates for LSP.
{ 'j-hui/fidget.nvim', opts = {} },
Expand Down Expand Up @@ -671,10 +686,10 @@ require('lazy').setup({
-- - settings (table): Override the default settings passed when initializing the server.
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
clangd = {},
-- gopls = {},
-- pyright = {},
-- rust_analyzer = {},
pyright = {},
rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
--
-- Some languages (like typescript) have entire language plugins that can be useful:
Expand All @@ -683,7 +698,7 @@ require('lazy').setup({
-- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {},
--

serve_d = {},
lua_ls = {
-- cmd = { ... },
-- filetypes = { ... },
Expand Down Expand Up @@ -768,6 +783,7 @@ require('lazy').setup({
end,
formatters_by_ft = {
lua = { 'stylua' },
asm = { 'asmfmt' },
-- Conform can also run multiple formatters sequentially
-- python = { "isort", "black" },
--
Expand Down Expand Up @@ -894,7 +910,7 @@ require('lazy').setup({
-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
vim.cmd.colorscheme 'retrobox'
end,
},

Expand Down Expand Up @@ -944,7 +960,7 @@ require('lazy').setup({
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
opts = {
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' },
ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc', 'xml', 'make' },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
Expand Down Expand Up @@ -973,12 +989,12 @@ 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
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 keymap

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- This is the easiest way to modularize your config.
Expand Down
17 changes: 17 additions & 0 deletions lsp/ocamllsp.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
return {
cmd = { 'ocamllsp' },
filetypes = {
'ocaml',
'ocaml.interface',
'ocaml.menhir',
'ocaml.ocamllex',
'dune',
'reason',
},
root_markers = {
{ 'dune-project', 'dune-workspace' },
{ '*.opam', 'esy.json', 'package.json' },
'.git',
},
settings = {},
}
17 changes: 17 additions & 0 deletions lua/custom/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
-- Minimal OCaml behavior: ocp-indent for typing, ocamlformat via ocamllsp on save.
-- 1) Disable ancient builtin ocaml indent script (we will use ocp-indent)
-- 4) Format-on-save: use only ocamllsp to format the buffer before write.
-- Keeps formatting deterministic and avoids other formatters stepping in.
vim.api.nvim_create_autocmd('BufWritePre', {
pattern = { '*.ml', '*.mli' },
callback = function()
if vim.bo.filetype == 'ocaml' then
vim.lsp.buf.format {
async = false,
filter = function(client)
return client.name == 'ocamllsp'
end,
}
end
end,
})
9 changes: 9 additions & 0 deletions lua/custom/plugins/render-markdown.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
return {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.icons' }, -- if you use standalone mini plugins
-- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons
---@module 'render-markdown'
---@type render.md.UserConfig
opts = {},
}
1 change: 1 addition & 0 deletions lua/kickstart/plugins/lint.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ return {
local lint = require 'lint'
lint.linters_by_ft = {
markdown = { 'markdownlint' },
make = { 'checkmake' },
}

-- To allow other plugins to add linters to require('lint').linters_by_ft,
Expand Down
4 changes: 4 additions & 0 deletions lua/kickstart/plugins/neo-tree.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ return {
},
opts = {
filesystem = {
filtered_items = {
visible = true,
hide_gitignored = false,
},
window = {
mappings = {
['\\'] = 'close_window',
Expand Down
Loading