feat(emacs): add c-sharp support

This is only initial support. Most of the features are built-in to lsp-mode. I
have added some snippets to make my life a bit easier.

There a more tweaks coming but they are general in improving the editing
experience not just targeted at c-sharp.
This commit is contained in:
Ade Attwood 2021-06-26 20:34:21 +01:00
parent bfe7d7af2a
commit 6976cfe1fa
5 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: /// <summary> ... </summary>
# key: ///
# --
/// <summary>
/// $0
/// </summary>

View file

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: /// <inheritdoc ... />
# key: ///i
# --
/// <inheritdoc${1: cref="${2:Class}"} />$0

View file

@ -0,0 +1,13 @@
# -*- mode: snippet -*-
# name: Practically BSD licence
# key: pbsd
# contributor: Ade Attwood <code@adeattwood.co.uk>
# uuid: pbsd
# --
/// <copyright file="`(file-name-nondirectory (buffer-file-name))`" company="Practically.io">
/// Copyright `(format-time-string "%Y")` Practically.io All rights reserved
///
/// Use of this source is governed by a BSD-style
/// licence that can be found in the LICENCE file or at
/// https://www.practically.io/copyright/
/// </copyright>

View file

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: Class property
# contributor: Ade Attwood <code@adeattwood.co.uk>
# key: prop
# uuid: prop
# --
public ${1:int} ${2:Name} { get; set; }${3: = ${4:"Default"}}$0

View file

@ -0,0 +1,11 @@
;;; c-sharp.el --- AMACS -*- lexical-binding: t; -*-
;;
;; Copyright 2021 Practically.io All rights reserved
;;
;; Use of this source is governed by a BSD-style
;; licence that can be found in the LICENCE file or at
;; https://www.practically.io/copyright/
(use-package csharp-mode
:ensure t
:hook (csharp-mode . lsp-deferred))