Setup

Binary

Download Binary (Linux only)

Linux

wget https://github.com/sylveryte/sylmark/releases/download/v0.7.1/sylmark_linux_amd64
chmod +x sylmark_linux_amd64

OR

Build from source

Prerequisites

  1. node v18+
  2. go build toolchain
  3. clang

Linux/Unix

  1. Clone repo
git clone https://codeberg.org/sylveryte/sylmark.git
  1. Navigate to root of project
cd sylmark
  1. First build sylgraph
cd server/sylgraph && npm i  && npm run build
  1. Navigate back to root
cd ../..
  1. Build lsp server using golang
CGO_ENABLED=1 go build
  1. Move your binary from ./sylmark to desired place eg: ~/bin/sylmark
 mv ./sylmark ~/bin/

Editor

Neovim

  1. Obtain Build and get path eg: ~/bin/sylmark_linux_amd64
  2. Add lsp config
    vim.lsp.config.sylmark = {
      cmd = { "path/to/binary" },
      root_markers = { '.sylroot.toml' },
      filetypes = { 'markdown' },
      on_attach = function(client, bufnr)
        vim.api.nvim_create_user_command(
          "Daily",
          function(args)
            local input = args.args

            client:exec_cmd({
              title = "Show",
              command = "show",
              arguments = { input }, -- Also works with `vim.NIL`
            }, { bufnr = bufnr })
          end,
          { desc = 'Open daily note', nargs = "*" }
        )
        vim.api.nvim_create_user_command(
          "Graph",
          function(args)
            local input = args.args

            client:exec_cmd({
              title = "Open Graph",
              command = "graph",
              arguments = { input }, -- Also works with `vim.NIL`
            }, { bufnr = bufnr })
          end,
          { desc = 'Start graph server and open', nargs = "*" }
        )
      end
    }

    vim.lsp.enable({
      "sylmark",
    })

VS Code

Plugin in progress